Files
greptimedb/tests/cases/standalone/common/timestamp/timestamp.sql
Eugene Tolbakov 1492700acc fix(timestamp): add trim for the input date string (#2078)
* fix(timestamp): add trim for the input date string

* fix(timestamp): add analyzer rule to trim strings before conversion

* fix: adjust according to CR
2023-08-03 23:33:47 +00:00

14 lines
454 B
SQL

SELECT timestamp ' 2017-07-23 13:10:11 ';
SELECT timestamp ' 2017-07-23 13:10:11 ';
CREATE TABLE timestamp_with_precision (ts TIMESTAMP(6) TIME INDEX, cnt INT);
INSERT INTO timestamp_with_precision(ts,cnt) VALUES ('2023-04-04 08:00:00.0052+0000', 1);
INSERT INTO timestamp_with_precision(ts,cnt) VALUES ('2023-04-04 08:00:00.0052+0800', 2);
SELECT * FROM timestamp_with_precision ORDER BY ts ASC;
DROP TABLE timestamp_with_precision;