DayOfWeek

Top  Previous  Next

S

A

W

WS

ü

ü

Syntax -

DayOfWeek <variable name> <DateValue1>

Where:

       <variable name> is the user defined name that is assigned to the variable.

       <DateValue1> is a literal string that represents a valid date or a variable that contains a date.

 

Description:

This command is used to determine the day of the week for a particular date.  The returned integer value is as follows:

Day

Returned Value

Sunday

0

Monday

1

Tuesday

2

Wednesday

3

Thursday

4

Friday

5

Saturday

6

 

Sample 1:

       The following statement uses the DayOfWeek command to find out the day of the week for a specific date.

DayOfWeek DW "2/20/2004"

 

Sample 2:

       The following statement uses the DayOfWeek command and the Reserved Variable Name, &TODAY, to find out the day of the week for the current system date.

DayOfWeek DW &TODAY