We aim to be consistent with Oracle[1]. Did you try Oracle's syntax? Based on what you say, I guess our doc[2] is out of date.
Julian [1] https://docs.oracle.com/cd/B19306_01/server.102/b14225/ch4datetime.htm [2] https://calcite.apache.org/docs/reference.html#scalar-types On Fri, Nov 16, 2018 at 10:15 AM Rui Wang <[email protected]> wrote: > > Hi Calcite community: > > I am using Calcite 1.17.0 and testing the syntax of constructing TIMESTAMP > [WITHOUT TIME ZONE], TIMESTAMP WITH LOCAL TIME ZONE and TIMESTAMP WITH TIME > ZONE in SELECTION. For example, I am doing tests like "SELECT TIMESTAMP > '2017-12-31 23:59:59'". > > I can construct TIMESTAMP [WITHOUT TIME ZONE] without any problem. However, > I am facing troubles to construct others. > > Per Calcite's website, this syntax is available: > > TIMESTAMP '2017-12-31 23:59:59 America/Los Angeles' > > However, my test failed with Illegal TIMESTAMP literal '2017-12-31 > 23:59:59 America/Los Angeles': not in format 'yyyy-MM-dd HH:mm:ss'. > > > I further tested > > TIMESTAMP '2017-12-31 23:59:59Z' > > TIMESTAMP_WITH_TIME_ZONE '2017-12-31 23:59:59 America/Los Angeles' > > TIMESTAMP WITH TIME ZONE '2017-12-31 23:59:59 America/Los Angeles' > > TIMESTAMP WITH LOCAL TIME ZONE '2017-12-31 23:59:59 America/Los Angeles' > > TIMESTAMP_WITH_LOCAL_TIME_ZONE '2017-12-31 23:59:59 America/Los Angeles' > > Neither one succeeded. > > > Is there anyone who happen to know what's the right way to construct > timestamp with time zones? Any help would be appreciated. > > -Rui
