Selecting calendar dates


the “from date” has to be the first day of the previous month. The “to date” has to be the last day of the previous month. How would i assign type into variables to do this specifically?


Hi @Junior458

This may not be the cleanest way, but from my testing these two expressions should give you the results you need for last and first day of previous months.

It currently converts the date to a string of format in the screenshot you shared. You can put the expression into a type into activity or assign it to a string variable.

First day: DateSerial(Year(Today().addmonths(-1)),Month(Today().addmonths(-1)),1).tostring(“MMM dd, yyyy”)

Last day: DateSerial(Year(Today().addmonths(-1)),Month(Today().addmonths(-1))+ 1,0).tostring(“MMM dd, yyyy”)

If you want the date variable just delete the .tostring… part onwards.

Hope this solves the challenge you faced.



1 Like

have a look here:

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