System.DateTimeOffset.DayOfWeek Property

Gets the day of the week represented by the current DateTimeOffset object.

Syntax

public DayOfWeek DayOfWeek { get; }

Value

Documentation for this section has not yet been entered.

Remarks

The value of the constants in the DayOfWeek enumeration ranges from DayOfWeek.Sunday to DayOfWeek.Saturday. If cast to an integer, its value ranges from zero (which indicates DayOfWeek.Sunday) to six (which indicates DayOfWeek.Saturday).

You can also display the weekday name of a particular date by using the "D" format specifier or the "dddd" custom format specifier. For example:

code reference: System.DateTimeOffset.Properties#4

Note that the string returned by calling the ToString method of the DayOfWeek enumeration member that is returned by this property is not localized. To extract a string that contains the weekday name of the current culture or of a specific culture, call the erload:System.DateTimeOffset.ToString method with the "dddd" custom format specifier. For example, the following code displays the weekday name for a date using the fr-fr culture.

code reference: System.DateTimeOffset.Properties#5

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0