How can I covert this PHP date string:
Thu 19th Aug 2010 @ 7:52PM
to this:
1282247549
Which is done by:
gmdate("D jS M Y @ g:iA", $row['project_deadline'])
The timestamp is from the database with the stored time()
function
How can I covert this PHP date string:
Thu 19th Aug 2010 @ 7:52PM
to this:
1282247549
Which is done by:
gmdate("D jS M Y @ g:iA", $row['project_deadline'])
The timestamp is from the database with the stored time()
function
You can parse that string into a UNIX timestamp with the strtotime
function:
$str = 'Thu 19th Aug 2010 @ 7:52PM';
$str = str_replace('@', '', $str);
$timestamp = strtotime($str);