Get Month Name in Salesforce Apex

Sample Code:

DateTime dt = DateTime.now();
String monthName = dt.format('MMMMM');
System.debug('Month Name : ' + monthName);

  • Karishma Gurjar

    How to do the same for Date data type