title: How to compare two times in java?
body: <p>I am developing a app for sync contacts. 
  Every contact have a update_time field.
  I want to <strong>compare</strong> this <strong>current update_time</strong> to <strong>previous update_time</strong>.</p>
  
  <p>My problem is I am storing this <strong>time as string format in my database</strong>.</p>
  
  <p><strong>1.How to convert this string to time?</strong> and </p>
  
  <p><strong>2.How to compare the two times?</strong></p>
  
  <p><strong>2014-07-11 15:10:55</strong> this is my time format.</p>
  
  <p>any help or comments welcome. thank you for your valuable answers.</p>