Adobe Forums

Add Me
Adobe Forums » Adobe Influences » Dynamic Html » Any cure for MySQL date entry problem?

Tags:



Reply
LinkBack Thread Tools Display Modes
Any cure for MySQL date entry problem?
  #1 (permalink)  
Old 09-25-2008, 03:18 AM
MartyMatthews
Guest
 
Posts: n/a
Default Any cure for MySQL date entry problem?

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



Reply With Quote


  #2 (permalink)  
Old 09-25-2008, 03:18 AM
Michael Fesser
Guest
 
Posts: n/a
Default Re: Any cure for MySQL date entry problem?

.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
Reply With Quote


Reply



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Hairstyles | UFO Videos | Bollywood Wallpapers | Poems  | WWE


All times are GMT. The time now is 02:01 AM.
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.