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
ravindrag
Participant
Posts: 40
Joined: Wed Dec 14, 2005 3:22 am

date error

Post by ravindrag »

i have a datecolumn 2055/12/09 with date datatype i have to populate to target datatype timestamp i.e to MSOLEDB but it is comming as 2055/00/00 i have tried 2055/00/00 : " " : Oconv( Time(), "MTS:" ) and
2055/00/00 :00:00:00 but it is not working

2.And i have to check a date if it is valid i have to load to target date datatype is date(8)


thanks in advance
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

From what it looks like your date datatype is of length 8 and you are trying to insert data whose length is greater than that. That is where you will need to look at. or are your point 1 and 2 two different scenarios?
Kris

Where's the "Any" key?-Homer Simpson
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

What is your source and target???
The date format seems to be ok.And if Oconv(Time(), MTS) is giving you all zeros, then there is something else going on. Try loading the output to a flat file and check the format.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
diamondabhi
Premium Member
Premium Member
Posts: 108
Joined: Sat Feb 05, 2005 6:52 pm
Location: US

Post by diamondabhi »

Might as well try 2055/00/00:" ":"00:00:00"
Every great mistake has a halfway moment, a split second when it can be recalled and perhaps remedied.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

2055/00/00 is not a date. Maybe that's the issue. Try 2055/01/01.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ravindrag
Participant
Posts: 40
Joined: Wed Dec 14, 2005 3:22 am

Post by ravindrag »

first and second points are different scenarios my source is sequential file and target is msoledb stage. when iam loading to flatfile it is working fine but it is coming as 2500/00/00 :00:00 when i am loading to database stage
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Then, clearly, there is something amiss with your derivation. Please post the derivation expression you used.
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