Calculates the week number for a date you enter. (The week number is an integer from 1 to 52. A week number is assigned sequentially to each week, beginning with the first week of the year. The first week of January is week number 1, the second week of January is week number 2, and so on.)
1 – Input
A date.
2 – Output
An unsigned integer from 1 to 52.
3 – Example
DTR> DECLARE CAL USAGE DATE EDIT_STRING X(23). DTR> CAL = "NOW"; PRINT CAL CAL 1-Feb-1983 08:51:11.55 DTR> PRINT FN$WEEK (CAL) FN$WEEK 5 DTR>