aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/datetime/date_out.sql
blob: bdf6f6909cb47e9cc34805a04ccc20034f7f4706 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* postgres can not */
select cast(cast(18000u as date) as string);
select cast(cast(18000u*86400ul+1u*3600u+2u*60u+3u as datetime) as string);
select cast(cast(18000u*86400000000ul+1u*3600000000ul+2u*60000000ul+3000000ul+4u as timestamp) as string);
select cast(cast(18000u*86400000000ul+1u*3600000000ul+2u*60000000ul+3000000ul+4u as interval) as string);

select cast(cast(49673u - 1u as date) as string);
select cast(cast(49673u as date) as string);

select cast(cast(49673u*86400ul - 1u as datetime) as string);
select cast(cast(49673u*86400ul as datetime) as string);

select cast(cast(49673u*86400000000ul - 1u as timestamp) as string);
select cast(cast(49673u*86400000000ul as timestamp) as string);

select cast(cast(49673u*86400000000ul - 1u as interval) as string);
select cast(cast(49673u*86400000000ul as interval) as string);