Scripting Home > Code Snippets > Date & Time Functions

Weekday() - Determine the weekday from a date

Description

The Weekday() function is used to determine the weekday from a date variable or formatted string.

Weekday(date[, [id=44#days]firstdayofweek[/id]]))

Returns a number between 1 and 7 representing the day of the week

Example

MyDay = Weekday("1-Apr-64") 'returns 4 (Wednesday)