1<?php
2$str = 'Tue Dec 15 2009';
3$timestamp = strtotime($str);
4echo $timestamp;
5//output: 1260831600
6?>
1// 1. create a date instance
2$date = new DateTime;
3
4// 2. set the date using the setDate(year, month, date) method on the
5// $date instance
6$date->setDate(1999,02,19);