18 lines
484 B
Text
18 lines
484 B
Text
|
SELECT
|
||
|
CURRENT_TIMESTAMP
|
||
|
- INTERVAL 2 YEARS
|
||
|
+ INTERVAL 1 MONTH
|
||
|
- INTERVAL 3 DAYS
|
||
|
+ INTERVAL 10 HOURS
|
||
|
+ interval 30 MINUTES
|
||
|
- INTERVAL 20 SECOND AS past_timestamp
|
||
|
FROM VALUES ("dummy");
|
||
|
|
||
|
WITH ts AS (
|
||
|
SELECT CURRENT_TIMESTAMP AS now FROM VALUES ('dummy')
|
||
|
)
|
||
|
SELECT
|
||
|
now - INTERVAL 1 DAY - INTERVAL 2 HOURS - INTERVAL 3 MINUTES - INTERVAL 4 SECONDS AS LONG_VERSION,
|
||
|
now - INTERVAL '1 2:3:4.100' DAY TO SECOND AS SHORT_VERSION
|
||
|
FROM ts;
|