Day from a date

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
sanjayS
Participant
Posts: 16
Joined: Mon Apr 18, 2011 10:56 pm

Day from a date

Post by sanjayS »

Hi all,

Could you please let me know hoe to get a Day (Monday,Tuesday) from a date ...Is there any functions in Parallel transformer..I have tried ..but am unable to figure out..

Thanks,
Sai
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Not sure whether this is a parallel job or a server job. You marked it as a parallel job but posted it in the server job forum.

Server Job Answer

Oconv(InLink.TheDate, "DWA") for week day name, Oconv(InLink.TheDate, "DWB") for week day name abbreviation.

Parallel Job Answers

WeekdayFromDate() will give you a weekday number in the week. Use the Field() function to extract the appropriate element from a delimited string of week day names.

Or use DateToString() function with an appropriate format string to return a week day name or a week day name abbreviation.

All of this is in the manual (Parallel Job Developer's Guide) and on-line help.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
peddakkagari
Participant
Posts: 26
Joined: Thu Aug 12, 2010 12:07 am

Post by peddakkagari »

Using WeekdayFromDate function you can get the day in numbers(0 to 6)
sanjayS
Participant
Posts: 16
Joined: Mon Apr 18, 2011 10:56 pm

Post by sanjayS »

Thanks for help..

problem resolved...
Post Reply