function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Janno RipJanno Rip 

Substract x business days from Today()

Hello everyone,

I am looking for a formula that gives me back a date based on the following idea:
 

TODAY() - X = newDate

where as X only consideres business days. The number of days (x) is stored in custom meta data.

I want to use this in a flow to calculate calls from the last x business days. Based on the formula I am going to substract x by 1 with every query passed. For example with x = 30, my outcome should look something like this:

Get Calls from TODAY () - 30 business days
Get Calls from TODAY () - 29 business days
Get Calls from TODAY () - 28 business days
Get Calls from TODAY () - ...

 

ShirishaShirisha (Salesforce Developers) 
Hi Janno,

Greetings!

You can use Date function to substract the businessdays as suggested in the below document:

https://developer.salesforce.com/forums/?id=906F00000008mtfIAA

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri