esandra Posted October 27, 2010 Share Posted October 27, 2010 //I need to take the month from the `today`(date) field and format this into `F`(January-December) //then display this in a drop down. //So this is how my query looks like: "select distinct substring(date, 6, 2) as month from arrastre order by month" //and the drop down ouputs 06, 07, 08, and 09 //the problem starts when I add this line: $month = date('F',strtotime($mrow['month'])); //..to format the month but it would only display january 4 times instead of june, july, august, september //How do I change this so it would format the month exactly as it should Link to comment https://forums.phpfreaks.com/topic/216964-date-format/ Share on other sites More sharing options...
esandra Posted October 27, 2010 Author Share Posted October 27, 2010 never mind. its SELECT DISTINCT MONTHNAME( date ) FROM arrastre Link to comment https://forums.phpfreaks.com/topic/216964-date-format/#findComment-1126987 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.