I'm running a simple procedure that reads from a
VARCHAR
column and inserts data into a TIME
column, using this format:
STR_TO_DATE(vTestTime, '%H:%i').
I'm getting the error
>SQL Error (1411): Incorrect datetime value: '09:22' for function str_to_date
I find that a similar statement, SELECT STR_TO_DATE("09:22", "%H:%i")
gives me a NULL when I run it from a HeidiSQL client.
I'm sure this syntax used to work and I'm not aware of having changed any settings, can you suggest what I've done wrong?
Edit: Just remembered I have made a recent change, I installed a Wordpress database on the same server, might that have had some affect?
Here's what get running on the server:
mysql> select str_to_date("09:22", "%H:%i");
+-------------------------------+
| str_to_date("09:22", "%H:%i") |
+-------------------------------+
| NULL |
+-------------------------------+
1 row in set, 1 warning (0.00 sec)
Warning (Code 1411): Incorrect datetime value: '09:22' for function str_to_date
Asked by user147997
(13 rep)
Mar 29, 2018, 01:48 PM
Last activity: Sep 6, 2022, 05:54 AM
Last activity: Sep 6, 2022, 05:54 AM