To get the Month name of a Datetime in C# and VB.NET you can use the following snippet.
Sample C#
Console.WriteLine(new DateTime(2010, 1, 1).ToString("MMM", CultureInfo.InvariantCulture)); //Jan Console.WriteLine(new DateTime(2010, 1, 1).ToString("MMMM", CultureInfo.InvariantCulture)); //January
Sample VB.NET
Console.WriteLine(New DateTime(2010, 1, 1).ToString("MMM", CultureInfo.InvariantCulture)) 'Jan Console.WriteLine(New DateTime(2010, 1, 1).ToString("MMMM", CultureInfo.InvariantCulture)) 'January
RT @CodeSnippetsNET: How to get the Month name of a #Datetime in C# and #VB .NET http://t.co/jvkn6reBvS #csharp #dotnet #programming #code …
RT @CodeSnippetsNET: How to get the Month name of a #Datetime in C# and #VB .NET http://t.co/jvkn6reBvS #csharp #dotnet #programming #code …
RT @CodeSnippetsNET: How to get the Month name of a #Datetime in C# and #VB .NET http://t.co/jvkn6reBvS #csharp #dotnet #programming #code …