Could you please help me with how to convert the string value '6/4/2020' to date?
My CSV file's timestamp column also comes in different string values, such as
4/6/2013
12/20/2019
1/17/2020.
Could you please help me with how to convert the string value '6/4/2020' to date?
My CSV file's timestamp column also comes in different string values, such as
4/6/2013
12/20/2019
1/17/2020.
In MySQL (totally independent of Python), we can convert a string to a DATE or DATETIME datatype using the STR_TO_DATE
function, documented in the MySQL Reference Manual
as a demonstration
SELECT STR_TO_DATE( '4/6/2013' ,'%m/%d/%Y') AS mydate
Reference: https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_str-to-date