Converting date from dd/mm/yy to yyyy/mm/dd in parallel

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
cnu
Premium Member
Premium Member
Posts: 38
Joined: Fri Jan 11, 2008 10:04 am

Converting date from dd/mm/yy to yyyy/mm/dd in parallel

Post by cnu »

I am applying stringtodate function but i am getting 08 as 1908.bit i need a 2008.
Please let me know how i can approach.

Thanks
cnu
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Search the forums for "century pivot", I found at least two posts with a possible solution in them for you.
-craig

"You can never have too many knives" -- Logan Nine Fingers
filename.txt
Participant
Posts: 27
Joined: Thu Mar 20, 2008 11:55 am

Post by filename.txt »

In stage Output>Format>Timestamp In Format String instead of %yy% use %2000yy%
Thanks.

"Creativity is the ability to use your available resources to their fullest."
cnu
Premium Member
Premium Member
Posts: 38
Joined: Fri Jan 11, 2008 10:04 am

Re: Converting date from dd/mm/yy to yyyy/mm/dd in parallel

Post by cnu »

Hi:

I want 19 when year from source is 99,98,90 etc.when ever sourc year is
08,07,03 etc it should pass 20 .

Please how can i resolve this requiremt.

Thanks
cnu
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Did you search for "century pivot"? That is what tells DataStage when to switch the century from 1900 to 2000, i.e. what year to 'pivot' the century change around.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Search for CENTURYPIVOT both here and in the manuals.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply