Data conversion

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
arshi
Participant
Posts: 50
Joined: Wed Apr 18, 2007 5:12 am

Data conversion

Post by arshi »

Hi,
How to convert the source data for one column 'June 2006' to 'Jun-06'.
The datatype for this column is Varchar,
Is it required to write a routine for this.

Regards,
Arshi
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

No, you can do it with an expression. For example (and this is not the only way):

Code: Select all

Oconv(Iconv("01 " : InLink.TheString, "DDMY"), "D-MBYL")
Last edited by ray.wurlod on Mon Apr 21, 2008 4:42 pm, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sinhasaurabh014
Participant
Posts: 86
Joined: Wed Apr 02, 2008 2:32 am
Location: Bangalore

Post by sinhasaurabh014 »

Oconv(Iconv(DSLink3.Inp_Dat,"D MY[2,4]"),"D-MBY[,2]")
where DSLink3.Inp_Dat ---source link name and Inp_Dat is the column name.

Nothing different..from the earlier response...you see
Post Reply