title: retrieve the query with maximum timestamp
body: <p>I have strings which contain query and timestamp separated with "---".
  Multiple strings have the same query but with different timestamp. I need to get the query with the maximum timestamp.</p>
  
  <p>The input string is like below:</p>
  
  <pre><code>3-13-2018 00:08:07.890---select * from tablename;
  3-13-2018 00:08:37.920---select * from tablename;
  3-13-2018 00:02:05.880---select * from tablename;
  </code></pre>
  
  <p>Kindly help me with an approach.</p>