MySQL Forums
Forum List  »  PHP

timestamp formating in php webpage
Posted by: AsBold AsLove
Date: April 08, 2009 04:59PM

hi all,

i have a table with a timestamp field.
when i output the timestamp to my php webpage the date is displayed so:
2009-04-07 23:13:24

i want to display it in a more friendly format.
something like: 7th April 2009 23:13

any ideas?

the cleaner the better.

i tried
echo date("F j, Y, g:i a", $created);
but got the wrong date
January 1, 1970, 1:33 am

thanks,

paul

Options: ReplyQuote


Subject
Written By
Posted
timestamp formating in php webpage
April 08, 2009 04:59PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.