I would use some sort of scripting language (PHP for
example) to format the date, and have that script
import the data into your table, rather than using
LOAD DATA INFILE.

If you post a sample of how your data file is
formatted, someone will gladly help you out. You might
want to post this to the PHP mailing list instead, as
this solution is somewhat off-topic from MySQL.

--- Serge Paquin <[EMAIL PROTECTED]> wrote:
> This is the only option?  That's not a very
> automated process and I must import this data once a
> day.  I also will not be able to get them to
> reformate their data since I'm only one of many many
> people downloading everyday.  Is their no way for
> load data to do this automaticaly?
> 
> Serge.
> 
> On Tue, 20 Aug 2002 21:31:45 +0100
> "DL Neil" <[EMAIL PROTECTED]> wrote:
> 
> > 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
> 


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

---------------------------------------------------------------------
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

Reply via email to