DOW Function
Syntax
Arguments
- date
A variable containing a date value or a character string containing a legitimate representation of a date value ( ISDATE (Date_Value) = .T.).
- Date_Time
A variable containing a date time value.
Description
DOW() returns an integer indicating the day of the week for the Date or Date_Time value.
- Number
- Day of the Week
- 1
Sunday
- 2
Monday
- 3
Tuesday
- 4
Wednesday
- 5
Thursday
- 6
Friday
- 7
Saturday
Example
dow(START) -> 2 if START contains 11/27/95 dow(CTOD("05/19/95")) -> 6
Suppose you want to determine whether orders are entered into the table at a constant rate, or if certain days are busier than others. The table contains a date field, ORDERDATE, indicating when the orders are entered. First, create an index using the expression:
dow(ORDERDATE)
Next, create a report with one level of grouping. For the group break expression, use the same expression. In the Group 1 footer, define and place a calculated summary field that will print a count of the number of records for the current group.
See Also