How to convert date to timestamp in PHP?


Question

How do I get timestamp from e.g. 22-09-2008?

1
330
8/4/2011 3:32:55 PM

PHP's strtotime() gives

$timestamp = strtotime('22-09-2008');

Which does work with the Supported Date and Time Formats Docs.

586
8/28/2013 10:13:27 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon