Get full name of the day C# datetime

get day name datetime c#
In most C# programs while formatting the dates we need to show complete or full name of the day. Here we are going to see how “dddd” format specifier is used to show full name of the day.

Sample code to show the full name of the day [C#]

using System;
using System.Globalization;
public class Example
{
public static void Main()
{
DateTime dateToFormat =  new DateTime(2008, 8, 29, 19, 27, 15); 
Console.WriteLine(dateToFormat.ToString("dddd"));
}
}
//Output
//Friday

0 Comments :

Post a Comment