Jump to content

[SOLVED] Is this possible... June 13, 2007 to MySQL Date?


suttercain

Recommended Posts

Hello,

 

There is a form on a clients page that allows the user to enter a date in the following format:

 

March 3, 2007

 

 

Is it possible to convert that single single string into:

 

2007-03-03

 

Thanks for your help.

 

PS. I tried strtotime with no luck.

Does it allow them to put the date like that by a text input, or a select input?

 

It will be a lot easier if you say "select input", but if not...we can work that out too.

 

EDIT:

 

By "select input" I mean something like this:

 

<select name="month">
   <option>January</option>
   <option>Feburary</option>
   <option>March</option>
</select>


...and so on

 

Then the same thing for the month/year.

It allows them to enter the date in a text input form. There are no drop downs. My client want to enter the date as such:

 

April 2, 2007

 

I know, I know... I would have used do downs if I could have.

 

Anyone know if this is possible? Thanks. I was thinking maybe explode???

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.