date conversion

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
lfong
Premium Member
Premium Member
Posts: 42
Joined: Fri Sep 09, 2005 7:48 am

date conversion

Post by lfong »

What would be the best way to convert a date in format yyddd (mainframe julian)?

Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Have you tried searching the pdf documentation for 'julian'? That's where I would start in your shoes.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You also need a business rule (CENTURYPIVOT) that defines how to handle two-digit years.

If the volumes are not large, a BASIC Transformer stage can do this easily. But what format does your target need to be? Here is one example (for a BASIC Transformer stage) that generates an ISO 8601 format date (YYYY-MM-DD).

Code: Select all

Oconv(Iconv(InLink.JulianDate, "D2YJ"),"D-YMD[4,2,2]")
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