Hello Serge, > I am having troubles with Load Data Infile and cannot figure out the problem. I have a date field but the format is 'Jan 1 1986' rather than mysql's default. So when I import I only get '0000-00-00' rather than the date. How can I tell MySQL what the format is? > > I have read through the manual and couldn't find anything. Spent about an hour now looking and now hoping someone here has the answer.
Alter the table by replacing the date field with a temporary replacement formatted as text (for example). Load the data. Alter the table to add the date field back into the table. Use SQL functions to format the date according to ISO. Alter the table to remove the temporary field. or Go back to the original source and have the date formatted correctly (ISO standard). Regards, =dn --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php