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 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 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; ?> Link to comment https://forums.phpfreaks.com/topic/148629-convert-date-format/#findComment-780484 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.