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
Cora GuerrierCora Guerrier 

How do I add business days to a date feild in Salesforce?

I have a field that represents the date that we will start (ProjectedInstallDate) work on a project. I have another text field with data brought over from a legacy program, call 'Install Time Required" the text in this feild is "1 Day", "2 Days", "3 Days", "4 Days", "5 Days", "6 Days"  etc...This data represent the estimated number of days it will take us to do the work.  I thought I could do a really simple formula like I pasted below to calculate the estimated finish date.... but I forgot that we don't work weekends.  What can I add to my formula to make the number of days only land on a weekday.

Data TypeFormula  
IF( xProject_InstallationTimeReq__c = "1 Days",xProject_ProjectedInstallDate__c + 1,
IF( xProject_InstallationTimeReq__c = "2 Days",xProject_ProjectedInstallDate__c + 2,
IF( xProject_InstallationTimeReq__c = "3 Days",xProject_ProjectedInstallDate__c + 3,
IF( xProject_InstallationTimeReq__c = "4 Days",xProject_ProjectedInstallDate__c + 4,
IF( xProject_InstallationTimeReq__c = "5 Days",xProject_ProjectedInstallDate__c + 5,
IF( xProject_InstallationTimeReq__c = "6 Days",xProject_ProjectedInstallDate__c + 6,
IF( xProject_InstallationTimeReq__c = "7 Days",xProject_ProjectedInstallDate__c + 7,
IF( xProject_InstallationTimeReq__c = "8 Days",xProject_ProjectedInstallDate__c + 8,
IF( xProject_InstallationTimeReq__c = "9 Days",xProject_ProjectedInstallDate__c + 9,
IF( xProject_InstallationTimeReq__c = "10 Days",xProject_ProjectedInstallDate__c + 10,
IF( xProject_InstallationTimeReq__c = "11 Days",xProject_ProjectedInstallDate__c + 11,
IF( xProject_InstallationTimeReq__c = "12 Days",xProject_ProjectedInstallDate__c + 12,
Null))))))))))))
Andrew GAndrew G
Hi Cora

Does this post help at all?

https://salesforce.stackexchange.com/questions/91880/date-formula-to-calculate-date-excluding-weekends

Regards

Andrew