How to convert Month(Text) into number?


I am getting the name of the month in text :i.e. August or March and I would need to convert it to number i.e: 08 or 03. How could I do it?

Thank you

1 Like

Hi @crowdo

Use sample like Now.ToString(“MM”). ToString


@crowdo Follow this

Assign input_month = “August”

Assign input_month = Datetime.ParseExact(input_month ,“MMMM”,System.Globalization.CultureInfo.InvariantCulture).ToString(“MM”)

1 Like

@AshwinS2 Now.ToString(“MM”). ToString Will give only current month in number

It is working, thank you very much for your fast reply

1 Like

S tried to gave a sample one

1 Like

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