ankur0101 Posted May 17, 2012 Share Posted May 17, 2012 Hi, In my database, date is stored as in the format of YYYY-MM-DD Something like $date = 2012-04-01 How can I extract this as follows ... $year = 2012 $month = 04 $day = 01 Thanks Link to comment https://forums.phpfreaks.com/topic/262686-how-to-do-yyyy-mm-dd-to-x-y-z/ Share on other sites More sharing options...
PFMaBiSmAd Posted May 17, 2012 Share Posted May 17, 2012 list($year,$month,$day) = explode('-',$date); Link to comment https://forums.phpfreaks.com/topic/262686-how-to-do-yyyy-mm-dd-to-x-y-z/#findComment-1346398 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.