How to get the last month's range?

Hello! I have a question. How to get the range from a previous month?

For example today is 2023-11-05 (YYYY-MM-DD)

I need to get two dates 2023-10-01 and 2023-10-31 . This would be the range for the entire month. How to do this in make?

Thanks.

Hi @ti ,

You could use this for the current month:


It gives:
image
Here is the blueprint:
month_range.json (3.3 KB)

For the last month, you can subtract on month to “now”, here is the new blueprint:
month_range_2.json (4.2 KB)

Hope this helps,

PBI

3 Likes

Hi @ti

Please try with the below functions.

Start Date : {{setDate(addMonths(now; -1); 1)}}
End Date:{{addDays(setDate(now; 1); -1)}}

Input:


Output:

If you require additional assistance, please don’t hesitate to reach out to us.
MSquare Support
Visit us here
Youtube Channel

2 Likes

Thanks you people!

Correct Answer is:

image

2 Likes

Hello there @ti :wave:

I just want to quickly jump in and say congrats on getting this up and running with the assistance of @Philippe_Billet and @Msquare_Automation :clap:

Also, thanks a lot for coming back in here and sharing what your final setup looks like. This is super valuable and has the potential to help many others looking for similar info in the future :pray:

1 Like