Int converted in string (month)

Hi everybody !

I am trying to get the month number in a date (like 30/12/2018 => 12) with Argument.Substring(3,2) and then to transform 12 as December to choose the right month in the calendar you can see.


But i can’t find how to transform this int in month depending the int the argument will return.
And i did not find any topic on this.

Can tou help me plz ?

Thank you in advance.

1 Like
DateTime dt = new DateTime(2010, monthNumber, 1)
monthName = dt.ToString("MMMM")
1 Like

Simple buddy, now you have the number as 12 and to get that as string of December, kindly assign a variable of string type with this

Out_Month_String = DateTime.ParseExact(“12”,“MM”,System.Globalization.CultureInfo.InvariantCulture).ToString(“MMMM”)

Out_Month_String = DateTime.ParseExact(Argumentname,“MM”,System.Globalization.CultureInfo.InvariantCulture).ToString(“MMMM”)

one step simple buddy and this worked as well


1 Like

Damn, you right, it works like a charm ! :slight_smile:

Thank you @Palaniyappan

1 Like

Cheers buddy keep going

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.