date 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
EJRoufs
Participant
Posts: 73
Joined: Tue Aug 19, 2003 2:12 pm
Location: USA

date conversion

Post by EJRoufs »

We have a date coming in in the form of a 5 digit number. It's the number of days since 1900 (January 1, 1900 being 00001). Is there anything built into DataStage that would help with converting this to a more "standard" date that we can use? Or does anybody have something already written up that we could use that does this, or something similar that we could leverage off of?

Thanks in advance for any help! :>
Eric
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

Post by ketfos »

Hi,

Use Oconv function as

Oconv(Arg1-24835, "D")

Where Arg1 is your 5 digit date format e.g 000000


ketfos
EJRoufs
Participant
Posts: 73
Joined: Tue Aug 19, 2003 2:12 pm
Location: USA

Post by EJRoufs »

ketfos wrote:Hi,

Use Oconv function as

Oconv(Arg1-24835, "D")

Where Arg1 is your 5 digit date format e.g 000000


ketfos

Thanks! I actually just found the solution, though. DataStage has a built in function, DateDaysSince1900ToTimestamp, that does exactly what i'm looking for. Very neat, and simple! Who would have thought? :>
Eric
Post Reply