conversion

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
rajee1234
Participant
Posts: 5
Joined: Wed Sep 16, 2009 10:32 pm
Location: india
Contact:

conversion

Post by rajee1234 »

Hi,

I have source like.... Its an year in the format (yy)

86,78,98,04,01,05....

i need to convert this source into (yyyy) format... target as..

1986,1976,1998,2004,2001,2005....

Thanks in advance
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Assuming you are keeping string format:

Code: Select all

IF In.DateString < 10 THEN '20':In.DateString ELSE '19':In.String
This assume the year 10 as the century break year.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Otherwise just add 2000 or 1900 for a numeric solution.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply