Skip to content

Commit

Permalink
test: add date function
Browse files Browse the repository at this point in the history
  • Loading branch information
killme2008 committed Dec 6, 2023
1 parent 38e65c0 commit d32e7d2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/cases/standalone/common/function/date.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
SELECT date_add('2023-12-06 07:39:46.222726'::TIMESTAMP_MS, INTERVAL '5 day');

SELECT date_add('2023-12-06'::DATE, INTERVAL '3 month 5 day');

CREATE TABLE dates(d DATE, ts timestamp time index);

INSERT INTO dates VALUES ('1992-01-01'::DATE, 1);

INSERT INTO dates VALUES ('1993-12-30'::DATE, 2);

INSERT INTO dates VALUES ('2023-12-06'::DATE, 3);

SELECT date_add(d, INTERVAL '1 year 2 month 3 day') from dates;

DROP TABLE dates;

0 comments on commit d32e7d2

Please sign in to comment.