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
kogads
Premium Member
Posts: 74 Joined: Fri Jun 05, 2009 5:36 pm
Post
by kogads » Tue Feb 02, 2010 1:00 pm
Hi All,
When i read the date and time column from DB2/UDB API stage i see the date as 12436 (2002-01-17) for date and 58384 (16:13:04) for time column instead of 2002-01-17 for DT and 16:13:04 for Time.These columns are loaded into seq file and the rarget data looks like 12436 for Date and 58384 for time.Pleae help.
Thanks in advance.
vinothkumar
Participant
Posts: 342 Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India
Post
by vinothkumar » Tue Feb 02, 2010 2:30 pm
Use DateFromDaysSince function. Give the first argument as the the value you are getting from date and second argument as '1970-01-01'
dhelsley
Participant
Posts: 9 Joined: Thu Jan 05, 2006 9:23 am
Post
by dhelsley » Wed Feb 10, 2010 11:35 am
Define the input column as VARCHAR and DataStage will not convert it to Universe's internal format.
Dave
DSguru2B
Charter Member
Posts: 6854 Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX
Post
by DSguru2B » Wed Feb 10, 2010 12:49 pm
Or just use the OCONV() function to convert it from internal to whatever format you like.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Wed Feb 10, 2010 12:58 pm
vinothkumar wrote: Use DateFromDaysSince function.
No such thing in a Server job.
-craig
"You can never have too many knives" -- Logan Nine Fingers
kogads
Premium Member
Posts: 74 Joined: Fri Jun 05, 2009 5:36 pm
Post
by kogads » Thu Feb 11, 2010 11:24 am
Thank You very much for your reply.It worked for me when defined as varchar.