Skip to main content
Announcements
Join us on Sept. 17 to hear how our new GenAI Assistant empowers data professionals: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
cramkumar86
Contributor III
Contributor III

Script to calculate last 60 business days

Hi,

I am trying to calculate last 60 business days from today()-1. Business days exclude Saturdays and Sundays. The below script does work for 60 calendar days. But how do I make it work for 60 business days?

Let vMaxDate = Date(today()-1);

Let vMinDate= Date(vMaxDate-60);

Please help.

Regards,

Ram

Labels (1)
3 Replies
JHuis
Creator III
Creator III

Dont you want to calculate MaxDate minus 12 weeks? 

 

Then you could use Date($(vMaxDate)-84)

 

Thats also the same as 60 working days. 

Prem0212
Creator
Creator

I think this expression will help you.

Prem0212_0-1682574791723.png

 

Date(today()-1)

Date(vMaxDate -83),

from today to calculate exactly 60 business days means 7 weeks which is 84 so that i have taken 83 for calculate from yesterday.

and to extract working 60 business days used Network days function.

 

Please like and accept the solution if u liked it.