Convert no into month

Hi All,

I have a variable name is month (month variable is in String).

I wanted that if month value is month=03 the result should be March… Means it converted it into month name.
every time month value will be change

Please help me on this

Regards,
Naim

CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(3)

Please import namespace “System.Globalization”

4 Likes

System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(3)

3 Likes

Thanks for your reply @Rahul and @Karthik I have dome same as you suggest but I am facing error
i.e. ‘CurrentCulture’ is not a member of “System.Globalization.CompareInfo”…/

Knidly suggest

Please review this code

Main.xaml (4.7 KB)

1 Like

HI Rahul,

I am using same as suggested by you…
But I am getting error.
Error is : ‘CurrentCulture’ is not a member of “System.Globalization.CompareInfo”

I have add name space also.

Thanks

@Naim

use this

System.Globalization.CultureInfo.InvariantCulture.DateTimeFormat.GetMonthName(1)

1 Like

Thank you everyone for your support…
Now It’s working.

1 Like

can anybody here help me to do the reverse ?

DateTime.ParseExact(MonthName, “MMMM”, CultureInfo.CurrentCulture ).Month

@Shivamvats1994

Please specify what datataype you want to reverse or example for your specific scenario which will be quite helpful to understand the problem statement.