I have a date-time data that comes in this format:


I've created a MariaDb database and a column for that date of type TIMESTAMP

However, when inserting the data into the column, I'll get an exception:

Db error: Incorrect datetime value: 2016-02-10T12:00:00.000Z for column `my_db`.`my_table`.`dt_column` 

I've tried to replace Z with '+00:00' -- to no avail, the error remained the same.

What's incorrect about it? Should I tweak the data type of my column somehow?

Or should I preprocess the value itself? How?

1 Answer 1


MySQL/MariaDB are rather lame when it comes to standard date syntaxes. Remove the Z. (REPLACE('...', 'Z', ''))

The T may also cause trouble. (REPLACE('...', 'T', ' '))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.