cancel
Showing results for 
Search instead for 
Did you mean: 

How to compare current month and the month that was 'n' days back

SwatiAgrawal
Level 5
Hi All,

I want to compare months. For Eg: the current month - 09 and what was the month 3 days back (In number).
Basically, i want to check if the month 3days back is same as current month or was it last month - 08. So, I am using this expression in decision box. Not sure if its appropriate.But it throws error. 
Please suggest how to compare months in numbers. I basically want to check if the month 3 days back was same as current month or not.

338.png


------------------------------
SWA
------------------------------
1 REPLY 1

Hi Swati,

You can try this FormatDate(DateAdd(9, -3, Now()), "MM")=FormatDate(Now(), "MM")
Note that equal to operator is used as it's a text comparison.

------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------