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
karthi_gana
Premium Member
Posts: 729 Joined: Tue Apr 28, 2009 10:49 pm
Post
by karthi_gana » Mon Mar 07, 2011 4:50 am
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 » Mon Mar 07, 2011 6:14 am
I think the function JulianDayFromDate may help.
Nayan
karthi_gana
Premium Member
Posts: 729 Joined: Tue Apr 28, 2009 10:49 pm
Post
by karthi_gana » Mon Mar 07, 2011 7:50 am
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
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Mon Mar 07, 2011 8:03 am
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
Posts: 729 Joined: Tue Apr 28, 2009 10:49 pm
Post
by karthi_gana » Mon Mar 07, 2011 8:38 am
i don't find it. can you provide me the syntax?
Karthik
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Mon Mar 07, 2011 8:55 am
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
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Mon Mar 07, 2011 9:03 am
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
Posts: 729 Joined: Tue Apr 28, 2009 10:49 pm
Post
by karthi_gana » Mon Mar 07, 2011 9:16 am
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