4 Replies Latest reply on Mar 7, 2017 10:31 AM by Mia Lee

    Trying to convert a string to a date

    Jason Green

      I am trying to change a string into date, however some of the records have a value of 0 instead of a string. I want to make the values that are 0 into NULL and convert the string values into a date. Right now the formula I am using is :

       

      IF [Original Call Date Key] = "0" THEN NULL

      ELSE

      DATE(LEFT([Original Call Date Key],4) + "/" + MID([Original Call Date Key],2,2) + "/" + RIGHT([Original Call Date Key],2))

      END

       

      It works but I get this error

       

      Oracle database error 1861: ORA-01861: literal does not match format string

       

      Can anyone please help?

       

      Thank you!