top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Informatica Expression Convert String to Date

+1 vote
915 views

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: enter image description here

posted Jun 9, 2014 by Sachin

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

0 votes

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.

answer Jun 10, 2014 by Shweta Singh
0 votes

Parse error coming because in your syntax you have mentioned 'AM' while you are using 24 hour date format.
Delete AM from the syntax and then validate it again.

answer Jun 11, 2014 by Shatark Bajpai
Similar Questions
+1 vote

I have source column(amount) with datatype string, contains the datas like $793.00, $5791.00,...

I need to load this same data into the target table column(amount) with datatype NUMBER

how can i get this same data with '$' symbol in target by using expression transformation in informatica?

anyone help me please, thanks in advance.

+2 votes

I have source column(amount) with datatype string, contains the datas like $793.00, $5791.00,...

I need to load this same data into the target table column(amount) with datatype NUMBER

How can i get this same data with '$' symbol in target by using expression transformation in informatica?

+1 vote

I am getting one data filed from one text file at format 'MM/DD/YY'(like '06/13/14'). Now I want to convert it as 'DD-MMM-YYYY' like (13-JUN-2014).

Please help me in this conversion.

+2 votes

I want to display the time stamp in following format '2011-04-22 10:41:57.000' to date as '04/22/2011' but when it convert it to following form TO_DATE(TO_CHAR(Date), 'MM/DD/YYYY HH24:MI:SS') it is displaying as null.

I am planning to use substring after the conversion

Can someone please tell me where i am going wrong?

...