Search code examples
expressioninformatica-powercenter

Informatica Expression Convert String to Date


I need to convert a string to a date so I can do a compare with what is in my column. My statement is this:

Decode(IsNew, FALSE, 
  IIF (v_save_view_row_obsolete_day <> 
    TO_DATE('9999-12-31 00:00:00 AM','YYYY-MON-DD HH24:MI:SS'), 
     '9999-12-31 00:00:00', v_save_view_row_obsolete_day))

When I validate I get this error: Error Image

Any ideas how to fix this?


Solution

  • You specified 24-hour format, so you don't need the AM meridian indicator in the converted date.

    Alternatively, you could add AM to the format parameter of TO_DATE.