Format Date for last month and year

nirmal

Member
Local time
Today, 14:21
Joined
Feb 27, 2020
Messages
82
I am trying to get the last month and year by
=Format(Date(),"mmmm" & " " & "yyyy")
Here I am getting March 2023
Actually I am trying to get the sequential last mont with year like February 2023
Tried all, but in vain
Please guide
 
=Format(DateAdd("m",-1,Date()),"mmmm" & " " & "yyyy")
 
Thank you Sir
It worked as expected.
Thank Again
 
the format can be simplified:

=Format(DateAdd("m",-1,Date()),"mmmm yyyy")
 
I am trying to get the last month and year by
=Format(Date(),"mmmm" & " " & "yyyy")
Here I am getting March 2023
Actually I am trying to get the sequential last mont with year like February 2023
Tried all, but in vain
Please guide
Why would you think that Date() would give you the previous month? :unsure:
 

Users who are viewing this thread

Back
Top Bottom