WeekdayName Function


WeekdayName Function

Class

Microsoft.VisualBasic.DateAndTime

Syntax

     Dim result As String = WeekdayName(weekday[, abbreviate[, _        firstDayOfWeekValue]]) 


weekday (required; Long)

The ordinal number of the weekday, from 1 (first) to 7 (last).


abbreviate (optional; Boolean)

Specifies whether to return the full day name or an abbreviation. The default value is False.


firstDayOfWeekValue (optional; FirstDayOfWeek constant)

Indicates the first day of the week. One of the following Microsoft.VisualBasic.FirstDayOfWeek enumeration members: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, or System (to use the regional default). If omitted, System is used.

Description

The WeekdayName function returns the name of the indicated weekday.

Usage at a Glance

  • weekday must be a number between 1 and 7, or the function generates an error.

  • The weekday argument must be an Integer, not a Date. Use the Weekday function to obtain a weekday from a date. The setting used for the first day of the week should be identical in both functions.

See Also

MonthName Function, Weekday Function




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net