Hi,
I need to convert the date which is in the form 20050202 to 2005-02-02.
I tried using the Modify stage in order to acheive this and gave the following derivation in the modify stage:LEAD_START_DATE=StringToDate(LEAD_START_DATE,"%yyyy%mm%dd")
Compilation was successful but the job aborted during run by giving the following message:
LEAD_START_DATE=StringToDate(LEAD_START_DATE,"%yyyy%mm%dd")
Is there anyother way to acheive this functionality in Modify Stage.
Please let me know
Thanks,
Bhavna
About Modify Stage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The entire error message is posted below:
main_program: Error parsing modify adapter: Error in binding: Unknown conversion: StringToDate; input:
(LEAD_START_DATE=StringToDate(LEAD_START_DATE,"%yyyy%mm%dd")
;
Also I tried using the date_from_string(string) function which converts the string to a date representation.
I gave the below specification:
LEAD_START_DATE=date_from_string(LEAD_START_DATE)
The job compiled and ran successfully but the value of the field is coming out to be NULL.Please let me know if i can use any other function to get the date in CCYY-MM-YY format.
Thanks,
Bhavna
main_program: Error parsing modify adapter: Error in binding: Unknown conversion: StringToDate; input:
(LEAD_START_DATE=StringToDate(LEAD_START_DATE,"%yyyy%mm%dd")
;
Also I tried using the date_from_string(string) function which converts the string to a date representation.
I gave the below specification:
LEAD_START_DATE=date_from_string(LEAD_START_DATE)
The job compiled and ran successfully but the value of the field is coming out to be NULL.Please let me know if i can use any other function to get the date in CCYY-MM-YY format.
Thanks,
Bhavna
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
[quote="BCAPP"]
Also I tried using the date_from_string(string) function which converts the string to a date representation.
I gave the below specification:
LEAD_START_DATE=date_from_string(LEAD_START_DATE)
The job compiled and ran successfully but the value of the field is coming out to be NULL.Please let me know if i can use any other function to get the date in CCYY-MM-YY format.
[/quote]
Hi,
You cannot use all the transformer functions since modify operator doent support that. But you can use the date_from_string function with parameters.
In your example you can try date_from_string[%yyyy%mm%dd](LEAD_START_DATE)
Regards
dsusr
Also I tried using the date_from_string(string) function which converts the string to a date representation.
I gave the below specification:
LEAD_START_DATE=date_from_string(LEAD_START_DATE)
The job compiled and ran successfully but the value of the field is coming out to be NULL.Please let me know if i can use any other function to get the date in CCYY-MM-YY format.
[/quote]
Hi,
You cannot use all the transformer functions since modify operator doent support that. But you can use the date_from_string function with parameters.
In your example you can try date_from_string[%yyyy%mm%dd](LEAD_START_DATE)
Regards
dsusr