Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to get the Month names for last three months.
I can get the current month name using the following expression:
Month(Today())
it returns me Nov.
But when I try using Month(Today())-1 it returns the value 10 instead of Oct.
To solve this issue I tried using Monthname(month(Today())-1) but it returns the value 'Jan 1900' instead of converting the '10' in Oct.
How can I get the previous month name?
Hi,
Try Addmonths Function.
=Month(Addmonths(Today(),-1))
To get Previous Month.
=Month(Addmonths(Today(),-2)) - to get the Month of Previous to Previous Month.
Regards,
Kaushik Solanki
Hi,
Try Addmonths Function.
=Month(Addmonths(Today(),-1))
To get Previous Month.
=Month(Addmonths(Today(),-2)) - to get the Month of Previous to Previous Month.
Regards,
Kaushik Solanki
Month(AddMonths(today(),-1))
U can use it to return previous month...
Thanks. It worked
The Kaushik Solanki response is correct to get the previous months. Then you can use the Date function to format that dates as desired:
=Date(AddMonths(Today(), -1), 'M') --> 10
=Date(AddMonths(Today(), -1), 'MMM') --> oct
=Date(AddMonths(Today(), -1), 'MMMM') --> october