title: PostgreSQL return exact or closest date to queried date
body: <p>I have the following postgresql syntax that returns values WHERE session_date matches $date_string</p>
  
  <p>Problem is that sometimes the $date_string will not be available in the table, so I am looking to return the closest date to the $date_string</p>
  
  <pre><code>$date_string = '2014-04-25';
  
  SELECT year, session_date FROM calendar_dates WHERE session_date='$date_string'
  </code></pre>
  
  <p>Any ideas how I can do this?</p>