Forum Moderators: coopster
<?
$fred = strftime("%d/%m/%y",strtotime('2007-12-11'));
echo "$fred";
?>
OR, prior to the "strtotime" line -- use
setlocale to modify the locale used by the script.
(yes I did mean December)
But ... already tried setlocale
<?
setlocale (LC_TIME, 'en_GB');
$fred = strftime("%d/%m/%y",strtotime('11/12/07'));
echo "$fred";
?>
produces the same result.
Also, as this is user input, I would prefer to stick to the common dd/mm/yy format.
thanks for any help
The function expects to be given a string containing a US English date format...
See also Date Input Formats [gnu.org], which is what
strtotime follows.