Horje
datetime month name Code Example
getname of month from date c#
using System;
using System.Globalization;

class Program
{
    static void Main()
    {

        Console.WriteLine(DateTime.Now.ToMonthName());
        Console.WriteLine(DateTime.Now.ToShortMonthName());
        Console.Read();
    }
}

static class DateTimeExtensions
{
    public static string ToMonthName(this DateTime dateTime)
    {
        return CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(dateTime.Month);
    }

    public static string ToShortMonthName(this DateTime dateTime)
    {
        return CultureInfo.CurrentCulture.DateTimeFormat.GetAbbreviatedMonthName(dateTime.Month);
    }
}
datetime month name
DateTime.ToString("MMMM")




Csharp

Related
sorting a list of objects in c# Code Example sorting a list of objects in c# Code Example
vb.net center form in screen Code Example vb.net center form in screen Code Example
minimize window windows forms application c# Code Example minimize window windows forms application c# Code Example
asp.net core api Self referencing loop detected for property Code Example asp.net core api Self referencing loop detected for property Code Example
list min and Max value in c# Code Example list min and Max value in c# Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8