Week Of the Year

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
anupam
Participant
Posts: 172
Joined: Fri Apr 04, 2003 10:51 pm
Location: India

Week Of the Year

Post by anupam »

Hi all,

i want to derive Week of the Day from Date. Is there any way by which i can acheive this.
----------------
Rgds,
Anupam
----------------
The future is not something we enter. The future is something we create.
anupam
Participant
Posts: 172
Joined: Fri Apr 04, 2003 10:51 pm
Location: India

Post by anupam »

Just correcting the previous message. I want to derive wekk of the Year from the date. How to go abt it.
----------------
Rgds,
Anupam
----------------
The future is not something we enter. The future is something we create.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Never hurts to search the forum first! Chances are someone else has already had this question (or at least a very similar one) asked and answered.

For example, check out:

viewtopic.php?t=84649&highlight=week+year
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Take a look at the WEEK.TAG Transform supplied with DataStage. It's under Built-In\Dates category of the Transforms branch.
In turn it invokes the WeekTag function, which is under the Examples category. In the routine you will find the business rules that determine which week is the first in the year (the week begins on Monday and must have 4 dates within the year.)
You can clone and adapt to suit your own particular requirements.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply