How to compare two times in java?
问题 I am developing a app for sync contacts. Every contact have a update_time field. I want to compare this current update_time to previous update_time . My problem is I am storing this time as string format in my database . 1.How to convert this string to time? and 2.How to compare the two times? 2014-07-11 15:10:55 this is my time format. any help or comments welcome. thank you for your valuable answers. 回答1: (You may want to consider storing the values in your database as integers instead of