Convert dates to Julian format

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
rajmohan
Participant
Posts: 2
Joined: Mon Dec 20, 2010 11:38 pm

Post by rajmohan »

how to change the date format dd/mm/yyyy to julian format in server job
for example 15/03/1985 to march 15 1985
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Rajmohan, I split this question from the completely unrelated post in the General forum that you added it to for some reason. Please take a moment and edit your post to add the relevant details for us - version, O/S, etc. They are only prompted for when you start a new conversation with the Post new topic button which is the action you should have chosen.

Date conversions in Server are done with the IConv and OConv functions, typically used in pairs - first to convert the original date to internal format and then back out to desired new external/output format. And FYI - your example target format is not a "julian" date, but rather a transition from "DMY" to "MDY" with the full month name.

I'll leave it to others to dig up the appropriate syntax for that, not one that I know off the top of my head and it's past my bedtime.
Last edited by chulett on Tue Dec 21, 2010 7:53 am, edited 1 time in total.
-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 »

Code: Select all

Oconv(Iconv(InLink.TheDMYDate, "DDMY"), "DMADY")
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