Page 1 of 1

Problem with StringtoDate function

Posted: Wed Sep 09, 2009 11:18 am
by reddy
Hi All,

In my job i am using the transformer stage where I have used stage variables to implement logic. In that I have used StringToDate function to give the default date value for a date field . But the job is failing with following error.

APT_CombinedOperatorController,0: Operator terminated abnormally: Terminating with exception:APT_ParseError: Parsing parameters "YYYYMMDD" for conversion "date=date_from_string[%yyyy-%mm-%dd](string)": APT_Conversion_String_Date: Invalid Format [YYYYMMDD] used for string_from_date type conversion

and the syntax i have given is

StringToDate('9999-01-01','YYYY-MM-DD')

Any help is appreciated

Thanks in Advance

Posted: Wed Sep 09, 2009 11:29 am
by ArndW
I would think that

Code: Select all

String To Date('9999-01-01','%yyyy-%mm-%dd')
will make DS happier.

Posted: Wed Sep 09, 2009 11:48 am
by reddy
Thanks Arndw ....That fixed my problem

Posted: Wed Sep 09, 2009 12:21 pm
by chulett
I would think that this would be more correcter:

Code: Select all

StringToDate('9999-01-01','%yyyy-%mm-%dd')