Hello the list
I have a bunch of data that I load in the base through
the "load data infile" procedure.
These data contain date with the following date format :
%d/%m/%Y [ that is day/month/year_4digit ]
I could rewrite the date with a script (perl, shell,)
to convert "day/month/year_4digit" into the standard MySQL format
that is "year_4digit-month-day", then load data in the base.
but I think I could take advantage of the STR_TO_DATE feature :
mysql> SELECT STR_TO_DATE('15/10/1999', '%d/%m/%Y');
+---------------------------------------+
| STR_TO_DATE('15/10/1999', '%d/%m/%Y') |
+---------------------------------------+
| 1999-10-15 |
+---------------------------------------+
I don't know how to do it on the fly :
should I create an string colum, in which I put the date like
"15/10/1999"
then run a mysql procedure that use STR_TO_DATE to fill a date column ?
how to do this ?
regards,
_-¯-_-¯-_-¯-_-¯-_
Gilles Missonnier
IAP - [EMAIL PROTECTED]
01 44 32 81 36
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]