GetDayName Method

DateTimeFormatInfo.GetDayName Method (DayOfWeek)

 

Returns the culture-specific full name of the specified day of the week based on the culture associated with the current DateTimeFormatInfo object.

Namespace:   System.Globalization
Assembly:  mscorlib (in mscorlib.dll)

Public Function GetDayName (
	dayofweek As DayOfWeek
) As String

Parameters

dayofweek
Type: System.DayOfWeek

A System.DayOfWeek value.

Return Value

Type: System.String

The culture-specific full name of the day of the week represented by dayofweek.

Exception Condition
ArgumentOutOfRangeException

dayofweek is not a valid System.DayOfWeek value.

For the default invariant DateTimeFormatInfo object, this method returns a string from the GregorianCalendar object.

dayofweek

Return Value

Sunday

"Sunday"

Monday

"Monday"

Tuesday

"Tuesday"

Wednesday

"Wednesday"

Thursday

"Thursday"

Friday

"Friday"

Saturday

"Saturday"

Universal Windows Platform
Available since 4.5
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show:
© 2016 Microsoft