For example I have this string "2015.02.10 01:24:13". And I need it to be converted to timestamp format 2015-02-10 01:24:13. I tried this
$dtime = DateTime::createFromFormat("Y-m-d H:i:s",$new_data['query_start_date']);
$post->query_start_date = $dtime->getTimestamp();
But it didnt work.