faqts : Computers : Databases : MySQL : Language and Syntax : Field Types : Date

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

23 of 41 people (56%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

What date formats does MySQL accept?
Can I use loose date formats in MySQL?

May 18th, 2000 20:40
Nathan Wallace, Sasha Pachev, Aaron Spangler


Loose dates don't work, and this is on purpose. The tradeof of having
the extra-smart insert for the date column is the extra CPU overhead
associated with trying to figure out what format the date follows, which
will slow down all date-related inserts. In our philosophy, the client
is responsible for proving a reasonably clean input for the INSERT
statement.

You can insert '68/6/4',(yy/mm/dd) but '6/4/68' (mm/dd/yy) is not valid
per the ANSI standard