### WeekDay

WeekDay and DayOfWeek are equivalent functions. However, WeekDay is preferred in Basic syntax and DayOfWeek is preferred in Crystal syntax.

##### Overloads

- WeekDay (date)
- WeekDay (date, firstDayOfWeek)

##### Arguments

- date is a Date or DateTime value for which a numeric designation for the day of the week is to be returned.
- firstDayOfWeek is an optional Number indicating the first day of the week. See DayOfWeek for more information. If not specified, Sunday is assumed.

##### Returns

Number value.

##### Action

WeekDay returns a number n which is the nth day of the week given a Date or DateTime value.

##### Typical use

WeekDay is often useful in performing date computations that take into account special days of the week such as weekends. See the DateSerial (year, month, day) examples section for some examples.

##### Examples

The following examples are applicable to both Basic and Crystal syntax:

`WeekDay (#Oct. 4, 1999#)`

Returns 2 since Oct. 3, 1999 is a Monday, and the first day of the week is assumed to be Sunday.

`WeekDay (#Oct. 4, 1999#, crMonday)`

Returns 1 since Oct. 3, 1999 is a Monday, and the first day of the week is specified to be Monday.

##### Comments

This function is designed to work like the Visual Basic function of the same name.

Seagate Software, Inc. http://www.seagatesoftware.com Please send comments to: techpubs@seagatesoftware.com