1

I am wondering, why does mariadb ignore timezone like '+00:00' with select statement however throw the error with create table statement?

SELECT CAST('2020-07-09 09:55:36.933554+00:00' AS DATE) dt;

dt

2020-07-09

CREATE TEMPORARY TABLE tmp AS SELECT CAST('2020-07-09 09:55:36.933554+00:00' AS DATE) dt;

(1292): Truncated incorrect datetime value: '2020-07-09 09:55:36.933554+00:00'

I read the question about the error and understand how to fix it. Just curious why such not obvious for me behaviour.

  • mariadb 10.3.15
Russel FP
  • 111
  • 1

0 Answers0