title: Presto SQL - Converting a date string to date format
body: <p>I'm on presto and have a date formatted as varchar that looks like - </p>
  
  <pre><code>7/14/2015 8:22:39 AM
  </code></pre>
  
  <p>I've looked the presto docs and tried various things(cast, date_format, using split_part to parse and then cast) and am not getting this to convert to a date format that I can use with functions like date_diff.</p>
  
  <p>I've tried:</p>
  
  <pre><code>cast(fieldname as timestamp)
  date_format(fieldname, '%Y-%m-%d %T)
  </code></pre>
  
  <p>Both give me an error like this </p>
  
  <pre><code>'Value cannot be cast to timestamp: 3/31/2016 6:05:04 PM'
  </code></pre>
  
  <p>How do I convert this?</p>