advanced code snippet search
sekihin on 03/09/09
3 people have marked this snippet as a favorite
$Date = date('Y-m-d', strtotime($Date));
Report this snippet
Be carefull here, the PHP date format is dependant on your OS version.
I'm using Windows, Dutch version, which means my time notation is MM/DD/YYYY
When I tried to enter 30 December 2008 as 30/12/2008 and then used it on that snip of yours, the echo printed 1970-01-01
When using 12/30/2008, I got the correct output.
You need to login to post a comment.