wemustdesign Posted March 9, 2010 Share Posted March 9, 2010 I am trying to format a date stored in my database. It is stored as: 2010-03-30 I am wanting to output as 30 Mar 10 I have tried a couple of methods including $Coursedate = date_format($Coursedate, '%W, %M %e'); but was giving the totally wrong date Link to comment https://forums.phpfreaks.com/topic/194690-format-date/ Share on other sites More sharing options...
danbriant Posted March 9, 2010 Share Posted March 9, 2010 $Coursedate = date_format($Coursedate, 'd, F y'); Might Help http://php.net/manual/en/function.date.php Link to comment https://forums.phpfreaks.com/topic/194690-format-date/#findComment-1023874 Share on other sites More sharing options...
wemustdesign Posted March 9, 2010 Author Share Posted March 9, 2010 I had already tried that method and got: date_format() expects parameter 1 to be DateTime, string given Nothing seems to work Link to comment https://forums.phpfreaks.com/topic/194690-format-date/#findComment-1023877 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.