| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Michael J. Pawlowsky | Date: | May 4 2005 8:08pm |
| Subject: | Re: INSERT DATE using USA Date Format SOLUTION | ||
| View as plain text | |||
Dan Nelson wrote: >>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 > > Yup.. that works... Thanks. INSERT INTO `test` (`mydate`) VALUES(STR_TO_DATE('12-31-2004', '%m-%d-%Y'));
| Thread | ||
|---|---|---|
| • INSERT DATE using USA Date Format | Michael J. Pawlowsky | 4 May |
| • Re: INSERT DATE using USA Date Format | Dan Nelson | 4 May |
| • Re: INSERT DATE using USA Date Format SOLUTION | Michael J. Pawlowsky | 4 May |
