Jump to content

date format


esandra

Recommended Posts

//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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.