melissal Posted April 9, 2009 Share Posted April 9, 2009 Hi, I have a date coming from a database. It's in the format YYYYMMDD, ie. 20090409. I need to turn it into this format: Thursday, April 9, 2009. Is there an easy way of doing this? Link to comment https://forums.phpfreaks.com/topic/153353-solved-date-formatting/ Share on other sites More sharing options...
Maq Posted April 9, 2009 Share Posted April 9, 2009 With the date function: $d = "20090409"; echo date("l, F j, Y", strtotime($d)); Link to comment https://forums.phpfreaks.com/topic/153353-solved-date-formatting/#findComment-805696 Share on other sites More sharing options...
melissal Posted April 9, 2009 Author Share Posted April 9, 2009 Perfect! Thanks! Link to comment https://forums.phpfreaks.com/topic/153353-solved-date-formatting/#findComment-805697 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.