Need to convert dd-mm-yy to yyyymmdd format

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
mac4rfree85
Participant
Posts: 126
Joined: Thu Jul 01, 2010 11:39 pm

Need to convert dd-mm-yy to yyyymmdd format

Post by mac4rfree85 »

Hi Guys,

I am getting a string in the format dd-mm-yy which i want it to convert it to yyyymmdd format. Can somebody help me.

Code: Select all

I/P                             O/P
21-01-86             19860121
23-03-08              20080323
Cheers!!!!
Mac4rfree
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Code: Select all

Oconv(Iconv(InLink.TheDate, "DDMY"), "DYMD" : @VM : "MCN")
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