Get name of month from Date

Hi Champs,

Urgent help needed . Any leads would be highly Appreciated.
I want a solution as if say.
I want to get month name based upon the date given to me . For example :
Consider the date format in (mm/dd/yyyy)

  1. if date is 5/7/2020 : I want the month name as if May
  2. If date is 7/7/2020 : I want the month name as if July
  3. if date is 12/23/2020 : i want month name as if December

Please Help !!.

Thanks in advance !!

If MyDate is a Datetime type, then MyDate.ToString("MMMM") will return the result you want.

If MyDate is a string type formatted as you show above, then Datetime.ParseExact(MyDate, "M/d/yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString("MMMM") will return the result you want.


GetMonthFromDt.xaml (4.0 KB)

try this also…!


1 Like

Thanks a lot @Anthony_Humphries !!!. I will try this in my code and will let you know the results :slight_smile:

Thanks A lot !! @kadiravan_kalidoss … i will try this though … :slight_smile:

1 Like

Thanks to Both of you @Anthony_Humphries and @kadiravan_kalidoss it actually worked.