我正在尝试将我的日期格式从mm/dd/yyyy改为MySQL format yyyy-mm-dd。 但它将数据年份更改为2020。这是我的代码: SELECT *, str_to_date(my_schema.product_history.log_date, '%m/%d/%y') as new_log_date FROM my_schema.product_history
我正试图在mysql中将字符串转换为date。尽管提供了正确的字符串和格式说明符,但mysql为NULL输出提供了警告消息,作为Incorrect datetime value: 'XXXXX' for function str_to_date,尽管它使用的是完整日期字符串mysql日志+----------
查询: select year(str_to_date(creation_date, "%d.%m.21:13:21' for function str_to_date
...You have an error in your SQL syntax; check the manual that corresponds to your MySQL server versionIncorrect datetime value: '30.03.2021 20:28:19'