PHP DateTime::getTimestamp April 25, 2012 Pramod T P It gets the Unix timestamp Example <?php $date1 = new DateTime(); echo $date1->getTimestamp(); ?> Output 1335328144