From: Dan Nelson Date: May 4 2005 6:42pm Subject: Re: INSERT DATE using USA Date Format List-Archive: http://lists.mysql.com/mysql/183625 Message-Id: <20050504184225.GD49336@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 dnelson@stripped