Uploaded image for project: 'Apache Trafodion (Retired)'
  1. Apache Trafodion (Retired)
  2. TRAFODION-2619

to_timestamp('2017/01/01 00:00:00') fail to convert

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.2.0, any
    • any
    • sql-exe
    • None

    Description

      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. Or can we have to_date('2017/01/01 00:00:00','YYYY/MM/DD HH24:MI:SS')?

      >>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.

      Attachments

        Activity

          People

            anoopsharma Anoop Sharma
            Yuan_Liu Yuan Liu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: