You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Yuan Liu (JIRA)" <ji...@apache.org> on 2017/05/18 04:02:04 UTC

[jira] [Created] (TRAFODION-2619) to_timestamp('2017/01/01 00:00:00') fail to convert

Yuan Liu created TRAFODION-2619:
-----------------------------------

             Summary: to_timestamp('2017/01/01 00:00:00') fail to convert
                 Key: TRAFODION-2619
                 URL: https://issues.apache.org/jira/browse/TRAFODION-2619
             Project: Apache Trafodion
          Issue Type: Improvement
          Components: sql-exe
    Affects Versions: any, 2.2-incubating
            Reporter: Yuan Liu
             Fix For: any


We can convert '2017-01-01' and '2017/01/01' to date, and we can convert '2017-01-01 00:00:00' to timestamp, but we can not convert '2017/01/01 00:00:00' to timestamp, can we have such enhancement.


>>select to_date('2017/01/01','YYYY/MM/DD') from dual;

(EXPR)
----------

2017-01-01

--- 1 row(s) selected.
>>select to_date('2017-01-01','YYYY-MM-DD') from dual;

(EXPR)
----------

2017-01-01

--- 1 row(s) selected.

>>select to_timestamp('2017/01/01 00:00:00') from dual;

*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data: 2017/01/01 00:00:00

--- 0 row(s) selected.
>>
>>
>>
>>select to_timestamp('2017-01-01 00:00:00') from dual;

(EXPR)
--------------------------

2017-01-01 00:00:00.000000

--- 1 row(s) selected.




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)