If you have a decent version of MySQL, I would have it return a Unix 
timestamp and just do a seconds comparison.

I noticed your other comment about comparing millis, but not quite 
understanding why you would have an issue with this?

Unless the server you use is under a large load all the time, I would use 
this on the server:

http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_unix-timestamp

Then pass the Unix timestamp in the JSON, then once pulled out, I would do a 
simple subtract and divide for the fastest results.

Steven
Studio LFP
http://www.studio-lfp.com


On Monday, October 3, 2011 11:25:39 PM UTC-5, ArcDroid wrote:
>
> Hello, 
> What is the best way to get the relative difference of a mysql 
> timestamp such as: 
>
> 2011-07-14 19:27:40  vs. 2011-07-14 19:25:30 
>
> Thanks in advance! 
> http://www.arcdroid.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to