A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.
Moderators: chulett , rschirm , roy
nagarjuna900
Participant
Posts: 35 Joined: Mon Dec 29, 2008 2:22 am
Location: chennai
Post
by nagarjuna900 » Wed May 26, 2010 6:27 am
HI,
in datastage 7.5 ( parallel jobs), how to display the 'day' from the Date value.
Thanks,
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Wed May 26, 2010 6:51 am
Display? And by "day" do you just mean the day number (1-31) or the day name? Regardless, check the DateToString() function and use the appropriate 'Date format string'.
-craig
"You can never have too many knives" -- Logan Nine Fingers
nagarjuna900
Participant
Posts: 35 Joined: Mon Dec 29, 2008 2:22 am
Location: chennai
Post
by nagarjuna900 » Wed May 26, 2010 6:56 am
Thanks,
But by using DateToString(), there is a option to display the day number ( 1-31), how to display the day name?
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Wed May 26, 2010 6:58 am
Same way - by using the appropriate date format string: %eee off the top of my head. Check the docs.
-craig
"You can never have too many knives" -- Logan Nine Fingers
vinothkumar
Participant
Posts: 342 Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India
Post
by vinothkumar » Wed May 26, 2010 7:46 am
Did you check 'WeekdayFromDate' function.
nagarjuna900
Participant
Posts: 35 Joined: Mon Dec 29, 2008 2:22 am
Location: chennai
Post
by nagarjuna900 » Wed May 26, 2010 8:26 am
the WeekDayFromDate function will display the number of the day in week, it will not display the name of the day.
Thanks,
vinothkumar
Participant
Posts: 342 Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India
Post
by vinothkumar » Wed May 26, 2010 8:30 am
Field('SUNDAY|MONDAY|TUESDAY|WEDNESDAY|THURSDAY|FRIDAY|SATURDAY','|',WeekdayFromDate(CAL_DATE)+1,1).. Can you try something like t his ?
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Wed May 26, 2010 9:22 am
Why for? The proper solution is far more simpler and has already been posted.
-craig
"You can never have too many knives" -- Logan Nine Fingers
vinothkumar
Participant
Posts: 342 Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India
Post
by vinothkumar » Wed May 26, 2010 12:28 pm
Is that option available in V7.5.x
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Wed May 26, 2010 5:39 pm
What 'option'? Regardless, check your docs and let us know.
-craig
"You can never have too many knives" -- Logan Nine Fingers
vinothkumar
Participant
Posts: 342 Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India
Post
by vinothkumar » Thu May 27, 2010 8:01 am
I did a search for %E in Parallel job developers guide (V7.5.2 in my machine). I am not able to find.
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Thu May 27, 2010 11:15 am
There's a table of date format tags (including "%eeee") in Chapter 2 of the Parallel Job Developer's Guide
It may be elsewhere in the version 7.5 manual, but I'd be pretty confident it's in there somewhere.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vinothkumar
Participant
Posts: 342 Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India
Post
by vinothkumar » Thu May 27, 2010 11:58 am
Thanks for the reply Ray. The Date format tags (i.e %eee) that you mentioned are available in PDF's which comes with V8.0. It is not there in V7.5 pdfs
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Thu May 27, 2010 12:12 pm
Try it... and if it doesn't work, then fall back on one of the other options posted.
-craig
"You can never have too many knives" -- Logan Nine Fingers