title: Find most recent date
body: <p>I have o table name table_1 with 4 columns <code>id</code>, <code>text</code>, <code>fromDate</code>, <code>toDate</code>. The table represents the working experience.I want to create a function which will return the row with columns <code>id</code>, <code>text</code> where the employee worked more recently. This means I need column <code>toDate</code> to be closest to today.</p>
  
  <p>Here is a demonstration of my code:</p>
  
  <pre><code>Select (abs("toDate"-now())) as date_diff
  from table_1
  
  Select id,text
  from table_1
  where (abs("toDate"-now()))=select min(date_diff)
  </code></pre>
  
  <p>Is this correct or is there something better I can do?</p>