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)
Suppose
if date is 5/7/2020 : I want the month name as if May
If date is 7/7/2020 : I want the month name as if July
if date is 12/23/2020 : i want month name as if December
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.
My problem is also same but a little bit of changes here,
my problem is if i enter a date is 12/03/2020 then i want that format as 12/May/2020.
Please help…