[android-developers] Re: Relative TIme Diff for Mysql Timestamp

2011-10-03 Thread ArcDroid
I actually converted the timestamps to milis, and everything works fine except for when I am comparing dates that are more than 7 days different. On Oct 3, 9:25 pm, ArcDroid wrote: > Hello, > What is the best way to get the relative difference of a mysql > timestamp such as: > > 2011-07-14 19:27:

[android-developers] Re: Relative TIme Diff for Mysql Timestamp

2011-10-03 Thread Studio LFP
Are you wanting to compare the time in Android or have the database query in MySQL do it? Steven Studio LFP http://www.studio-lfp.com -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@

[android-developers] Re: Relative TIme Diff for Mysql Timestamp

2011-10-04 Thread ArcDroid
I would like to compare the strings in Android if possible. thanks arcdroid http://www.arcdroid.com On Oct 3, 10:42 pm, Studio LFP wrote: > Are you wanting to compare the time in Android or have the database query in > MySQL do it? > > Steven > Studio LFPhttp://www.studio-lfp.com -- You receiv

[android-developers] Re: Relative TIme Diff for Mysql Timestamp

2011-10-05 Thread Zsolt Vasvari
You use MySQL on Android? On Oct 4, 1:42 pm, Studio LFP wrote: > Are you wanting to compare the time in Android or have the database query in > MySQL do it? > > Steven > Studio LFPhttp://www.studio-lfp.com -- You received this message because you are subscribed to the Google Groups "Android Dev

[android-developers] Re: Relative TIme Diff for Mysql Timestamp

2011-10-05 Thread ArcDroid
I use php that returns a json object that is from a mysql db :-) On Oct 5, 12:04 am, Zsolt Vasvari wrote: > You useMySQLon Android? > > On Oct 4, 1:42 pm, Studio LFP wrote: > > > > > > > > > Are you wanting to compare the time in Android or have the database query in > >MySQLdo it? > > > Steven

[android-developers] Re: Relative TIme Diff for Mysql Timestamp

2011-10-05 Thread Chris
On Tuesday, October 4, 2011 12:25:39 AM UTC-4, ArcDroid wrote: > 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 > > Create Date objects using DateFormat to parse your formatted st

[android-developers] Re: Relative TIme Diff for Mysql Timestamp

2011-10-05 Thread Studio LFP
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,