Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2002
    Location
    Bremen / Germany
    Posts
    3

    Unanswered: TO_DATE with special Characters

    Hi all,
    I've to transform a Date String like '2015-04-30T12:03:20'.
    Using SELECT TO_DATE('2015-04-30T12:03:20','YYYY-MM-DD,HH24:MIS') from dual does not work.
    I think because the 'T' is a special character.
    Any idea how to solve this problem?

  2. #2
    Join Date
    Mar 2007
    Posts
    623
    Just as documentation about Datetime Format Elements says, enclose the string in double quotation marks.
    Code:
    SELECT TO_DATE('2015-04-30T12:03:20','YYYY-MM-DD"T"HH24:MI:SS') from dual;
    Document link for 11gR2: http://docs.oracle.com/cd/E11882_01/...004.htm#i34948

  3. #3
    Join Date
    Mar 2002
    Location
    Bremen / Germany
    Posts
    3

    Red face To_date

    Yes this works fine. Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •