Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
July 8, 2005, 9:53 am
rate this thread
Re: Date stored in DB in the following format: 2004-06-29 09:06:36+01
It will actually work as-is, although the +01 is a timezone offset so
may give you unexpected results depending on the time of day (which may
of course be the intention).
If you want to remove the +01 at the end then use substr() to get rid of
it eg date("d/m/y", strtotime(substr($dbdate, 0, 19))); Or you could do
it in the database query itself.
Chris Hope | www.electrictoolbox.com | www.linuxcdmall.com