jesushax Posted March 9, 2009 Share Posted March 9, 2009 hi all, my database stores dates in the following format YYYY-MM-DD eg 2009-03-09 how can i convert what is displayed on my webpages so it says 9th of march 09 or just 09-03-2009 Thanks Quote Link to comment https://forums.phpfreaks.com/topic/148629-convert-date-format/ Share on other sites More sharing options...
waynew Posted March 9, 2009 Share Posted March 9, 2009 http://ie.php.net/date Quote Link to comment https://forums.phpfreaks.com/topic/148629-convert-date-format/#findComment-780480 Share on other sites More sharing options...
Maq Posted March 9, 2009 Share Posted March 9, 2009 Try: $d = "2009-03-09"; $new_date = date("jS M y",strtotime($d)); echo $new_date; ?> Quote Link to comment https://forums.phpfreaks.com/topic/148629-convert-date-format/#findComment-780484 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.