php strtotime to datetime code example Example: convert string to date php $s = '08/11/2010 19:37:02'; $date = strtotime($s); echo date('Y-m-d H:i:s', $date);