|
Posted by Vincent Delporte on 01/11/07 03:26
On Thu, 11 Jan 2007 03:57:03 +0100, Vincent Delporte
<justask@acme.com> wrote:
>There may be a better way, such as telling PHP that the dates are
>formatted as dd/mm/yyyy instead of mm/dd/yyyy so that strtotime will
>work without the above kung-fu, but I don't know.
And if you want to do the opposite when reading dates from MySQL and
display them in a web page:
$query = "SELECT name,DATE_FORMAT(mydate,'%d/%m/%Y') FROM mytable";
Maybe it's possible to configure MySQL so that it always spits out
dates as dd/mm/yyyy to avoid using DATE_FORMAT().
Navigation:
[Reply to this message]
|