At 08:39 PM 10/14/2006, Ferindo Middleton wrote:
Is there a way to change the format of date fields MySQL is expecting when
LOADing data from a file? I have no problem with the format MySQL saves the
date but most spreadsheet programs I use don't make it easy to export text
files with date fields in the format YYYY-MM-DD even if I formated the field
that way on-screen.

It would be great if you could tell MySQL on the command line to expect
dates in the format Month/Day/Year or something like that and be able to
interpret that and convert the date to the format it's expecting on the fly.

--
Ferindo

Ferindo,
If you don't want to change the input file to the proper date format, then you'll need to read the data into a temporary table and manipulate the string date into a MySQL date 'yyyy-mm-dd'. I belive MaxDb has the ability to change the date format before loading data. There used to be a page where you could submit suggestion but I was only able to come up with this one: http://www.mysql.com/company/contact/. I think MySQL AB deliberately hides the suggestions page.<g> There is also a comment by Remco Wendt at http://dev.mysql.com/doc/refman/5.0/en/load-data.html which shows you how to load European dates that may be of help to you.

Mike
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to