>I am looking at moving some old database systems to MySQL and I am
Quote:
>currently working on data loading using mysqlinport.
>
>I have an issue with dates as all the data that is coming my way has
>dates in DD/MM/YYYY. the load routines look to only accept it in
>YYYY/MM/DD.
|
My suggestion is not to try to fight MySQL in terms of how the data
is *stored*. Using date_format(), you can get the data out of the
database in one of an incredible number of formats. Using str_to_date(),
you can convert input in lots of formats to a date, provided you know
what format is coming in.
Quote:
|
>Is there anyway of telling the routines to use the European date format?
|
I'm not that experienced in the use of mysqlimport, but I believe you
can import the files like this:
1. Set up your table, with string fields for the dates.
2. Do the import.
3. Add date fields to the table.
4. Fill the date fields from the corresponding string fields, using
something like
UPDATE table SET datefieldname = str_to_date(stringfieldname, '%d/%m/%Y');
Repeat if you've got more than one date field you're trying to import.
5. Drop the string fields.