How to get previous month (full name)

Hello,

I have followed a previous post to use “DateTime.Now.AddMonths(-1).ToString(“MMM”)”. While it does work, I prefer to have the full month’s name. Anyway this can be done?

1 Like

You were almost done
the expression should be like ths
DateTime.Now.AddMonths(-1).ToString(“MMMM”)

Cheers @rojem

3 Likes

Hi @Rojem,

As @Palaniyappan said, you can use “MMMM” to get the full name of the month.
You can check all the formats available here:

Thanks and best regards,
Susana

1 Like

Thanks all, @Susana @Palaniyappan

2 Likes

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