DATE AND TIME FORMAT

Ask about a PHP problem here.
Post Reply
User avatar
louiegiezer
Posts: 57
Joined: Fri Oct 21, 2011 11:31 am
Contact:

DATE AND TIME FORMAT

Post by louiegiezer »

how can i add am/pm in my time....
i try this one '%d/%m/%Y %H:%i:%s A' but it doesn't work...


problem solved.... i change the A into %p... :lol:
User avatar
killfrog47
Posts: 106
Joined: Tue Mar 12, 2013 2:52 am
Location: Tempe, AZ
Contact:

Re: DATE AND TIME FORMAT

Post by killfrog47 »

Here is what I have for the news posting area on the site im building for a client.
echo 'Posted: ' . date("g:i a F j, Y ", strtotime($row["datetime"]));
The "datetime" Is the name of the db table storing the time. The output for that is
Posted: 10:57 pm May 7, 2013
User avatar
louiegiezer
Posts: 57
Joined: Fri Oct 21, 2011 11:31 am
Contact:

Re: DATE AND TIME FORMAT

Post by louiegiezer »

thanks dude... that is much better... :D
User avatar
killfrog47
Posts: 106
Joined: Tue Mar 12, 2013 2:52 am
Location: Tempe, AZ
Contact:

Re: DATE AND TIME FORMAT

Post by killfrog47 »

louiegiezer wrote:thanks dude... that is much better... :D
No problem buddy =)
Post Reply