Type
Date Function

Purpose
The weekday function converts a date value to an integer that corresponds to the day of the week from 1 (Monday) to 7 (Sunday).

Syntax
weekday( DATE VALUE)

Returns
An integer value from 1 to 7.

Examples
weekday( 12/31/99)
Returns: 5

spellweekday ( weekday( 12/31/99) )
Returns: Friday

weekday( DATE)
Converts the value in the DATE field into an integer from 1 to 7 for every record processed. If a record contains the value 10/31/00 (a Sunday), the function returns 7.