current date () to julian date (YYDDD)

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
karthi_gana
Premium Member
Premium Member
Posts: 729
Joined: Tue Apr 28, 2009 10:49 pm

current date () to julian date (YYDDD)

Post by karthi_gana »

All,

I would like to change the currentdate() format i.e YYYYMMDD to julian format (YYDDD).

I have searched here and i see the vice versa only.
Karthik
nayanpatra
Participant
Posts: 41
Joined: Sat Jun 06, 2009 11:13 pm
Location: Kolkata

Post by nayanpatra »

I think the function JulianDayFromDate may help.
Nayan
karthi_gana
Premium Member
Premium Member
Posts: 729
Joined: Tue Apr 28, 2009 10:49 pm

Post by karthi_gana »

nayanpatra wrote:I think the function JulianDayFromDate may help.
it is nor working...my requirement is...oh..sorry...i think i wrongly mentioned my requirement in the subject..anyway...my requirement is

2011XXX where XXX = number of days of the year

i.e 2011066
Karthik
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Pretty sure if you check the docs that a mask of %ddd will get that for you.
-craig

"You can never have too many knives" -- Logan Nine Fingers
karthi_gana
Premium Member
Premium Member
Posts: 729
Joined: Tue Apr 28, 2009 10:49 pm

Post by karthi_gana »

:(

i don't find it. can you provide me the syntax?
Karthik
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It's in the Parallel Job Developer Guide pdf, search for "%ddd" or "Date and time formats". In my version that starts on page 31.
-craig

"You can never have too many knives" -- Logan Nine Fingers
karthi_gana
Premium Member
Premium Member
Posts: 729
Joined: Tue Apr 28, 2009 10:49 pm

Post by karthi_gana »

chulett wrote:Pretty sure if you check the docs that a mask of %ddd will get that for you.
I have seen this in the below URL. But don't know to implement it. Can you give me the syntax?

http://publib.boulder.ibm.com/infocente ... tions.html
Karthik
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I said "formats" not "functions", if you clicked a little deeper you'll find them. And there's nothing magical about this, just do it like you would with any other date using DateToString().
-craig

"You can never have too many knives" -- Logan Nine Fingers
karthi_gana
Premium Member
Premium Member
Posts: 729
Joined: Tue Apr 28, 2009 10:49 pm

Post by karthi_gana »

chulett wrote:I said "formats" not "functions", if you clicked a little deeper you'll find them. And there's nothing magical about this, just do it like you would with any other date using DateToString().
exactly :)

That worked fine :)
Karthik
Post Reply