How to Display the Day from the date value in parallel job

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
nagarjuna900
Participant
Posts: 35
Joined: Mon Dec 29, 2008 2:22 am
Location: chennai

How to Display the Day from the date value in parallel job

Post by nagarjuna900 »

HI,

in datastage 7.5 ( parallel jobs), how to display the 'day' from the Date value.


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

Post by chulett »

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 »

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
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

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 »

Did you check 'WeekdayFromDate' function.
nagarjuna900
Participant
Posts: 35
Joined: Mon Dec 29, 2008 2:22 am
Location: chennai

Post by nagarjuna900 »

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 »

Field('SUNDAY|MONDAY|TUESDAY|WEDNESDAY|THURSDAY|FRIDAY|SATURDAY','|',WeekdayFromDate(CAL_DATE)+1,1).. Can you try something like t his ?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

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 »

Is that option available in V7.5.x
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

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 »

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 »

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 »

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 :roll:
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

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
Post Reply