How to get the month name from a date in VB.NET

1 Answer

0 votes
Imports System

Public Class MonthNameFromDate_VB_NET
	Public Shared Sub Main()
        Dim monthName As String = New DateTime(2013, 2, 27).ToString("MMMM")
        Console.WriteLine(monthName)
		
        monthName = New DateTime(2013, 2, 27).ToString("MMM")
        Console.WriteLine(monthName)
    End Sub
End Class
        
         
 
' run:
'
' February
' Feb
'

 



answered Jan 7, 2025 by avibootz
...