title: converting php string with date and time to sql timestamp
body: <p>I have a php string which contains the date and time as shown below</p>
  
  <pre><code>2015-05-27 18:45:31
  </code></pre>
  
  <p>How can I convert this to a type which I can insert into postgresql table with timestamp data type?</p>