aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/datetime/date_convert.sql
blob: 01d8e296cf177e495c2d6bc798a91e600749bb63 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* postgres can not */
select Yql::Convert(Yql::Date(AsAtom("1")),AsAtom("Uint8"));
select Yql::Convert(Yql::Date(AsAtom("1")),AsAtom("Uint32"));
select Yql::Convert(Yql::Date(AsAtom("1")),AsAtom("Int32"));
select Yql::Convert(Yql::Date(AsAtom("1")),AsAtom("Uint64"));
select Yql::Convert(Yql::Date(AsAtom("1")),AsAtom("Int64"));

select Yql::Convert(Yql::Datetime(AsAtom("1")),AsAtom("Uint8"));
select Yql::Convert(Yql::Datetime(AsAtom("1")),AsAtom("Uint32"));
select Yql::Convert(Yql::Datetime(AsAtom("1")),AsAtom("Int32"));
select Yql::Convert(Yql::Datetime(AsAtom("1")),AsAtom("Uint64"));
select Yql::Convert(Yql::Datetime(AsAtom("1")),AsAtom("Int64"));

select Yql::Convert(Yql::Timestamp(AsAtom("1")),AsAtom("Uint8"));
select Yql::Convert(Yql::Timestamp(AsAtom("1")),AsAtom("Uint32"));
select Yql::Convert(Yql::Timestamp(AsAtom("1")),AsAtom("Int32"));
select Yql::Convert(Yql::Timestamp(AsAtom("1")),AsAtom("Uint64"));
select Yql::Convert(Yql::Timestamp(AsAtom("1")),AsAtom("Int64"));

select Yql::Convert(Yql::Interval(AsAtom("1")),AsAtom("Uint8"));
select Yql::Convert(Yql::Interval(AsAtom("1")),AsAtom("Uint32"));
select Yql::Convert(Yql::Interval(AsAtom("1")),AsAtom("Int32"));
select Yql::Convert(Yql::Interval(AsAtom("1")),AsAtom("Uint64"));
select Yql::Convert(Yql::Interval(AsAtom("1")),AsAtom("Int64"));