Page 1 of 1

Week Of the Year

Posted: Thu Mar 11, 2004 6:04 am
by anupam
Hi all,

i want to derive Week of the Day from Date. Is there any way by which i can acheive this.

Posted: Thu Mar 11, 2004 6:05 am
by anupam
Just correcting the previous message. I want to derive wekk of the Year from the date. How to go abt it.

Posted: Thu Mar 11, 2004 7:57 am
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

Posted: Thu Mar 11, 2004 4:33 pm
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.