Week number
Georgia Miller
Georgia Miller <georgia_miller@mail.gfps.k12.mt.us>
31 Oct 2003 16:31:48 -0700
Hi Mikael,
This is how I do it, to determine what day of the week a certain date is. This example is determining what day of the week today is:
DEFINE DAY-NUMBER NUM*1 = MOD(DAYS(SYSDATE),7)
Then the corresponding number will be:
0 = Sunday
1 = Monday
2 = Tuesday
3 = Wednesday
4 = Thursday
5 = Friday
6 = Saturday
Here is another example of it tested:
> def ddate date = parm
> def x num*1 = mod(days(ddate),7)
> rep ddate x
> go
DDATE: 20031026
10/31/03 GFPS Human Resources System PAGE 1
DDATE X
10/26/03 0
Georgia Miller
Great Falls Public Schools
Great Falls, Montana
On 10/31/2003 3:01 AM, Mikael.Olesen@qss-uk.com wrote:
>Week number
>Hi
>Does anyone out there have a piece of quiz code that calculates the
>week number from a date?
>Thank you
>Kind Regards
>Mikael Olesen
>
>
>Mikael Olesen
>Analyst Programmer
>Phone: 01444 445340
>Email: mikael.olesen@qss-uk.com
>