get timestamp from date php code example
Example 1: php datetime object get unix timestamp
$date = new DateTime();
echo $date->getTimestamp();
Example 2: strtotime format
$date = '25/05/2010';
$date = str_replace('/', '-', $date);
echo date('Y-m-d', strtotime($date));