|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
On user entry forms with a MySQL database, dates must be entered as YYYY-MM-DD,
which for Americans is counter-intitutive. I know about the option to use a series of very long drop-down lists to select each of the pieces, but I find that both cumbersome and time consuming. I currently am using instructions to the user with each date field, but that is clutzy. Does anybody know of a way to use "mm/dd/yyyy"? Thanks! Marty |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
..oO(MartyMatthews)
>On user entry forms with a MySQL database, dates must be entered as YYYY-MM-DD, >which for Americans is counter-intitutive. I know about the option to use a >series of very long drop-down lists to select each of the pieces, but I find >that both cumbersome and time consuming. I currently am using instructions to >the user with each date field, but that is clutzy. > > Does anybody know of a way to use "mm/dd/yyyy"? MySQL expects the dates to be stored as YYYY-MM-DD in a DATE or DATETIME field. Use your script to convert from MM/DD/YYYY if necessary, before you insert the date into the DB. If you're on PHP, have a look at its date and time functions, especially strtotime() and strftime(). Micha |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Thanks Mitcha.
Marty |
|
![]() |
| Outils de la discussion | |
|
|