ClickHouse/tests/queries/0_stateless/02889_datetime64_from_string.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
566 B
MySQL
Raw Normal View History

SELECT toDateTime64('-123', 3, 'UTC'); -- Allowed: no year starts with '-'
SELECT toDateTime64('23.9', 3, 'UTC'); -- Allowed: no year has a dot in notation
SELECT toDateTime64('-23.9', 3, 'UTC'); -- Allowed
2023-11-03 07:32:37 +00:00
SELECT toDateTime64OrNull('0', 3, 'UTC');
SELECT cast('0' as Nullable(DateTime64(3, 'UTC')));
SELECT toDateTime64('1234', 3, 'UTC'); -- { serverError CANNOT_PARSE_DATETIME }
SELECT toDateTime64('0', 3, 'UTC'); -- { serverError CANNOT_PARSE_DATETIME }
SELECT cast('0' as DateTime64(3, 'UTC')); -- { serverError CANNOT_PARSE_DATETIME }