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

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

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.2.0, any
    • Fix Version/s: any
    • Component/s: sql-exe
    • Labels:
      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

            • Assignee:
              anoopsharma Anoop Sharma
              Reporter:
              Yuan_Liu Yuan Liu

              Dates

              • Created:
                Updated:

                Issue deployment