Date Offsets

Archive of postings to DataStageUsers@Oliver.com. This forum intended only as a reference and cannot be posted to.

Moderators: chulett, rschirm

Locked
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Date Offsets

Post by admin »

Dhida,

When you say "binary date" do you mean Julian (that is, an offset from a particular day zero)? For example, in DataStage, the "binary" form of 08/31/2000 is 11932, and day zero is 12/31/1967.

On this basis, you can calculate that your day zero is 12/31/1899 (day 1 is 01/01/1900). You can simply apply the offset (24836, the difference between the two). For example: Oconv(MyDate-24836, "D/MDY[2,2,4]")

You should also look at the Transforms and Routines in the Date branch of the SDK routines in DataStage Manager for more options and alternatives.

Regards,
Ray


> ----------
> From: Dhida Frances M. Wacnang[SMTP:dwacnang@Informix.Com]
> Sent: Friday, 20 October 2000 16:24
> To: ray.wurlod@Informix.Com; tak.chu@Informix.Com
> Subject: DS routine
>
> Guys,
>
> Would you happen to have a routine that would transform a binary
> date into a DM4 format?
>
> Sample : 36768 08/31/2000
>
>
> Thanks!
> Dhida Frances M. Wacnang
> Informix, Philippines
>
Locked