C#DateTimeDayOfWeek
ToString

DayOfWeekDateTime

DayOfYear

Gets the day of the week represented by this instance.

Syntax

dt.DayOfWeek

Example

Enter values below to update the example in real time.

dt
new
Console
WriteLine
Saturday
DateTime dt = new DateTime(2024, 6, 15);
Console.WriteLine(dt.DayOfWeek);   // Saturday