Date Error

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
adams06
Participant
Posts: 92
Joined: Sun Mar 12, 2006 3:00 pm

Date Error

Post by adams06 »

Hi

i am getting date in this format 82205

if i use this code

OCONV(ICONV(FMT(Link.DATE,"6'0'R"),"DMDY[1,1,2]"),"DYMD[4,2,2]")

i am getting the following error:
data for column exceeds column width (8), row 33 (approx), data = 2005/08/22

My Target column length is 8 and sql type is varchar.

can any one suggest me.

Thanks in advance.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Dont you already have an open thread???
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
aditya
Charter Member
Charter Member
Posts: 41
Joined: Sat May 28, 2005 7:32 am

Post by aditya »

Try trimming the year field as YY instead of YYYY.

Play around with the options of ICONV.

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

Post by ray.wurlod »

The delimiter characters ("/") are making this date 10 characters long, so it won't fit in a Char(8) field. Change the second argument of Oconv() to

Code: Select all

"DYMD[4,2,2]":@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