spires Posted January 25, 2012 Share Posted January 25, 2012 Hi Simple question, how do I reFormat a date. $dateCreated (2012-01-14) to become: 14th jan 2012 So far I have this, but it's not working: $expDate = explode('-',$dateCreated); $date1 = mktime(0, 0, 0, date('m', $expDate[1]), date('d', $expDate[2]), date('Y', $expDate[0])); $date = date('d m Y', $date1); Thanks Quote Link to comment https://forums.phpfreaks.com/topic/255745-date-formatting/ Share on other sites More sharing options...
litebearer Posted January 25, 2012 Share Posted January 25, 2012 perhaps something like this(bleary eyed - untested)... <?php $date1 = "2012-01-04"; $date2 = date("l - \T\h\e jS \d\a\y \of F", strtotime($date1)) ?> Quote Link to comment https://forums.phpfreaks.com/topic/255745-date-formatting/#findComment-1311011 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.