On Tue, 22 Apr 2008 07:08:55 -0700 (PDT), SOLVER
<mariusz@poplawski.org.uk> wrote in
<f48512ab-77e6-4f34-a3e0-aad33f40d3ef@k37g2000hsf.googlegroups.com>:
>I can't figure out why this is not working propelly:
>
>date("d.m.Y",strtotime("05/03/2008 00:00:00")); result: 03.05.2008
>date("d.m.Y",strtotime("18/05/2008 00:00:00")); result: 05.06.2009
From <http://us2.php.net/manual/en/function.strtotime.php>:
"The function expects to be given a string containing a US English
date format..." The U.S. format is "MM/DD/YYYY", while the European
formation is "DD/MM/YYYY".
Assuming that the first date is March 5, 2008, then you should write:
strtotime("3/5/2008 00:00:00");
The second should be:
strtotime("5/18/2008 00:00:00");
Check out some of the comments on that page for information regarding
European formats.
--
Charles Calvert | Software Design/Development
Celtic Wolf, Inc. | Project Management
http://www.celticwolf.com/ | Technical Writing
(703) 580-0210 | Research