In the last episode (May 04), Michael J. Pawlowsky said:
> I have some data where the date is already in USA format
> (MM-DD-YYYY). I would like to be able to insert this data without
> having to massage the date in the code.
MySQL seems to think that USA format is "MM.DD.YYYY", which I've never
seen before :)
> Is there a way to specify the Date Format for an INSERT statement?
>
> Something like:
>
> INSERT INTO tblMyTable(myDate) VALUES(DATE_FORMAT('USA', '12-31-2004');
Try the STR_TO_DATE function:
SELECT STR_TO_DATE('12-31-2004','%m-%d-%Y');
2004-12-31
--
Dan Nelson
[EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]