Datetime format YYYYMMDD hh:mm:ss.fff
I need to insert the following query in MariaDB :
INSERT INTO Table (ID, Value, Date) VALUES ('Test1', '33', '20210315 11:15:27.059'); but I have an Error : /* SQL Error (1292): Incorrect datetime value: '20210315 11:15:27.059' for column 'Date1' at row 1 */
is there a way to change the DateTime format or the delimiter to make this format 20210315 11:15:27.059 supported by the database?
Answer Answered by Ian Gilfillan in this comment.
No, since what you are attempting to insert is not a valid datetime, the only other alternative would be to make the field a string.
Comments
Comments loading...
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.