|
|||||||||||
|
RE: load data
From: Rhys Campbell <rhys.campbell(at)touchlocal.com>
Date: Wed Jul 11 2007 - 04:55:06 EDT
You could put a trigger on the table that would format the dates before insert (although I'd go for the above)
-----Original Message-----
Hi All,
Data is comming in files. The date format in the file is "dd-mon-yyyy hh24:mi:ss', but as you all know, in mysql , the default date format is "yyyy-mm-dd hh24:mi:ss". How can i specifiy this format in the load data infile script. I tried this LOAD DATA LOCAL INFILE 'abc.txt' INTO TABLE abc FIELDS TERMINATED BY ',' LINES TERMINATED BY '^V\n' (doj timestamp "dd-mon-yyyy hh24:mi:ss"); but data is not getting inserted. Please help me.
regards
This email is confidential and may also be privileged. If you are not the intended recipient please notify us immediately by telephoning +44 (0)20 7452 5300 or email postmaster@touchlocal.com. You should not copy it or use it for any purpose nor disclose its contents to any other person. Touch Local cannot accept liability for statements made which are clearly the sender's own and are not made on behalf of the firm.
Touch Local Limited
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=lists@pantek.comReceived on Wed Jul 11 04:55:01 2007 This archive was generated by hypermail 2.1.8 : Thu Aug 02 2007 - 01:56:52 EDT |
||||||||||
|
|||||||||||