The WEEKUw. informat reads the week-number value within
the year, and then returns a SAS date value by using the U algorithm.
If the input does not contain a year expression, then WEEKUw. uses the current year as the year expression,
which is the default. If the input does not contain a day expression,
then WEEKUw. uses the first
day of the week as the day expression, which is the default.
The U Algorithm calculates
the SAS date value using the number-of-week value within the year
(Sunday is considered the first day of the week). The number-of-week
value is represented as a decimal number in the range 0–53,
with a leading zero and maximum value of 53. For example, the fifth
week of the year would be represented as 05.
The inputs to the WEEKUw. informat are the same date for the following
example. The current year is 2012.
Widths
|
Formats
|
Examples
|
3-4
|
Www
|
w01
|
5-6
|
yyWww
|
12W01
|
7-8
|
yyWwwdd
|
12W0101
|
9-10
|
yyyyWwwdd
|
2012W0101
|
11-200
|
yyyy-Www-dd
|
2012-W01-01
|