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 > > <http://www.arcdroid.com> Create Date objects using DateFormat to parse your formatted strings, and then create two Calendar objects and call setTime using previously constructed Dates. Then call cal1.compareTo(cal2) to get your answer. This is pure, basic Java, nothing Android specific. -- 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@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en