Page 1 of 1

Date conversion using Modify

Posted: Thu Sep 06, 2007 4:54 am
by elavenil
Trying to convert string into a date and the job got aborted with the error message as "Error parsing modify adapter: Error in binding: Expected source field selector; got: "2007"
Expected destination field selector, got: ")"; input:"


The code that was applied in the modify stage is as below.

BIZDATE:DATE = date_from_string (#BISDATE#) [%yyyy-%mm-%dd]

Please help me by sharing your ideas.

Thanks
Elavenil

Posted: Thu Sep 06, 2007 6:24 am
by balajisr
Specification should be:

Code: Select all

BIZDATE:DATE = date_from_string [%yyyy-%mm-%dd] (#BISDATE#) 

Posted: Thu Sep 06, 2007 6:41 am
by elavenil
Thanks for your response.

Already tried this and it did not work and the error message was the same.

Regards
Elavenil

Posted: Thu Sep 06, 2007 8:41 am
by JoshGeorge
Hmm is the jop parameter playing the villan? Pass BISDATE from a previous stage try.

Posted: Thu Sep 06, 2007 4:15 pm
by ray.wurlod
The argument to a Modify stage specification must be the name of an input column - you can not use job parameters here. Create the column upstream of the Modify stage - perhaps using a Column Generator stage.

Note that it is the date format string that is in square brackets - the input column name is in parentheses.

Posted: Fri Sep 07, 2007 2:01 am
by elavenil
Thank you all for your responses.

Yes. The conversion did not work when parameter is used in the conversion in the modify stage.

Parameter was used in the previous stage to create a column and that column was used in the modify stage and it works.

I will mark this problem as resolved.

Regards
Elavenil