MySQL Forums
Forum List  »  MySQL Workbench

Re: Can't export Excel to MySQL with Python due to date error
Posted by: Peter Brawley
Date: March 06, 2022 04:04PM

MySQL uses the international date format yyyy-mm-dd, not the oddball US mm/dd/yy format.

See the Load Data Infile manual page for how to process nonstandard date values in US format, eg ...

Load Data Infile ...
...
(col1,col2,...,@datavar,col4,col5,...)
...
set col3 = str_to_date( @datevar, '%m/%d/%y' )

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Can't export Excel to MySQL with Python due to date error
116
March 06, 2022 04:04PM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.