David Perron wrote:

I have a pretty large file with a Date column in the format M/D/YYYY.

Is there a way to either change the Date data type in the table or a method
to indicate the date format in the LOAD DATA statement in order to handle
this?

in VI the following should work depending on the other data in the file

:%s/ \(\d\d\)\/\(\d\d\)\/\(\d\d\d\d\)/ \3-\1-\2/
:%s/ \(\d\d\)\/\(\d\)\/\(\d\d\d\d\)/ \3-\1-0\2/
:%s/ \(\d\)\/\(\d\d\)\/\(\d\d\d\d\)/ \3-0\1-\2/
:%s/ \(\d\)\/\(\d\)\/\(\d\d\d\d\)/ \3-0\1-0\2/


this only works if there is a space in front of the dates. If the date is the first thing on the line, replace the first space on each line with a ^ and remove the second space.
If the date is quoted, replace both spaces on each line with a quote.
If the date is preceded by just a tab, replace both spaces on each line with a \t

--
Chris W
KE5GIX

Gift Giving Made Easy
Get the gifts you want & give the gifts they want One stop wish list for any gift, from anywhere, for any occasion!
http://thewishzone.com


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

Reply via email to