DateTimeFormatInfo.GetDayName Method

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
Assemblies:   System.Globalization (in System.Globalization.dll)
  mscorlib (in mscorlib.dll)

member GetDayName : 
        dayofweek:DayOfWeek -> 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.

ExceptionCondition
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"

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

XNA Framework

Supported in: 3.0, 2.0, 1.0

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone Silverlight 8.1, Windows Phone Silverlight 8

Portable Class Library

Supported in: Portable Class Library
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft