[plug] php4 mysql date functions.

shayne oneill shayne at guild.murdoch.edu.au
Tue Dec 10 15:46:39 WST 2002


Cool cool. So far so good.

Do you know of a way of getting this back out sensibly? (Ie 12 Jan 2003
2:30pm type thing?)
----- Original Message -----
From: "Leon Brooks" <leon at brooks.fdns.net>
To: <plug at plug.linux.org.au>
Sent: Monday, December 09, 2002 9:44 PM
Subject: Re: [plug] php4 mysql date functions.


> On Monday 09 December 2002 06:17 pm, shayne oneill wrote:
> > I need to insert dates and times into a datetime field in a mysql
database,
> > and get a sensible string back on retrieval.
>
> IIRC, MySQL expects something like 'YYYY-MM-DD HH:MM:SS', so try inserting
> date ('Y-m-d H:i:s', $stamp) - you might also need a timezone (not sure on
> this) lest it be assumed to mean GMT.
>
> Cheers; Leon
>
>



More information about the plug mailing list