Page 1 of 1

Time Question

Posted: Sat May 03, 2003 5:50 pm
by voodoo9055
How does one change 13:00 to 1:00 in PHP?

All of my times are showing up in military time.

Posted: Sun May 04, 2003 5:03 am
by twigletmac
How are you generating your times?

Mac

Posted: Sun May 04, 2003 9:40 am
by voodoo9055
For example:

Code: Select all

<? echo date("d M Y H:i", $f_record&#1111; timesent ]); ?>

Posted: Sun May 04, 2003 1:16 pm
by twigletmac
Have a read of this for generating dates in the format you want, you just need to change slightly how you are using the date() function:
http://www.php.net/manual/en/function.date.php

And read this to find out why you should be quoting array element names:
http://www.php.net/manual/en/language.t ... rray.donts

Mac

Posted: Sun May 04, 2003 1:29 pm
by voodoo9055
I didn't know that about the second part. Hey thanks alot! :D