Top  Previous  Next

function DayOfWeek(DateValue As DateTime) As Integer


Returns the day of the week of the specified date as an integer between 1 and 7, where Sunday is the first day of the week and Saturday is the seventh.


DayOfWeek is not compliant with the ISO 8601 standard, which defines Monday as the first day of the week.




DateValue ... Date expression.



Dim i
= Day(Now)
' returns eg. i = 4 (=Wednesday)