Lets say in my mysql database I have a timestamp 2013-09-30 01:16:06 and lets say this variable is $ts.
2013-09-30 01:16:06
$ts
How can I output this to show more like September 30th, 2013?
September 30th, 2013
$timestamp = "2013-09-30 01:16:06"; echo date("F jS, Y", strtotime($timestamp)); //September 30th, 2013
Note the use of S to get the english ordinal suffix for the day. Since you're already using strtotime if you need a human readable data for the current time you can just use the keyword "now" as in strtotime("now")
S
strtotime
strtotime("now")
Related sources
2.1m questions
2.1m answers
60 comments
57.0k users