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? Quote 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)); Quote 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! Quote Link to comment https://forums.phpfreaks.com/topic/153353-solved-date-formatting/#findComment-805697 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.