Reputation: 170
I want to check if a variable date is in the month that is two months prior to today's date.
Is there a way (using a built in date funciton like dateadd()) to cover the edge cases of when month(now())=1 or month(now())=2
in more elegant manner than the following?
?format(month(now()) & " " & year(now()),"MMMM YYYY")=format(dateadd("M",2,format(varMonth & " " & varYear, "MMMM YYYY")),"MMMM YYYY")
Upvotes: 0
Views: 843