|
|
ClassMicrosoft.VisualBasic.DateAndTime SyntaxDim result As Integer = Weekday(dateValue[, dayOfWeek])
DescriptionThe Weekday function returns a value indicating the day of the week. A value of 1 indicates the first day of the week; 7 is the last day. These numbers are interpreted based on the definition of the first day of the week. By default, Sunday is the first day of the week. Usage at a GlanceIf passing a date literal as dateValue, the Weekday function requires that all four digits of the year be present. ExampleSince the code: Weekday(#11/7/2005#, FirstDayOfWeek.Sunday) returns 2; the date November 7, 2005 is a Monday. Version DifferencesThe named parameters of the function have changed from date and firstDayOfWeek in VB 6 to dateValue and dayOfWeek in .NET respectively. See AlsoDatePart Function, Day Function, WeekdayName Function |
|
|