Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Number of days less weekends calc

Marking time

Recommended Posts

Can anyone help? I cannot see any way that I can calculate the number of days elapsed less weekend days. I currently have;


If (IsEmpty ( Date finished ) ; ((Get ( CurrentDate )-Date Recieved)-Waiting quote) ;((Date finished - Date Recieved) - Waiting quote))


Should I bee approaching this from another direction?




Link to comment
Share on other sites

Well for once, I'm not going to attack each new problem/post afresh. Here's a solution I posted elsewhere recently (hopefully adjusted to your need). What is waiting quote? I hope it is a number. I manually adjusted the calc depending upon what I THINK you are doing; let us know if it needs adjusted.


If ( DateReceived ) ;

Let ( [

spanStart = DateReceived - Mod ( DateReceived ; 7 ) ;

theDate = If ( not DateFinished ; Get ( CurrentDate ) ; DateFinished ) - WaitingQuote ;

spanEnd = theDate - Mod ( theDate ; 7 ) + 6 ;

wkndCount = Div ( spanEnd - spanStart + 1 ; 7 ) * 2 - (spanStart theDate )

] ;

theDate - DateReceived + 1 - wkndCount




The span starts at the first Sunday prior to the DateReceived and the span ends on Saturday after theDate ( DateFinished - WaitingQuote ) or Get ( CurrentDate) - WaitingQuote). Weekend count is the full weeks in between then boolean test deducts one day if span starts before DateReceived (indicating first day of span is Sunday and NOT within the range) and deducts one day if span ends after theDate (indicating last day of span is Saturday and not within the range). Once we know the weekend count, we subtract weekend count from total days in the (inclusive) date range.


If I left a parenth or semicolon out during this manual manipulation of the calc, I plead Friday-syndome. The calc does work. smiley-laughing


UPDATE: Oh, calc result is NUMBER and must be UNSTORED.



Link to comment
Share on other sites

Hi LaRetta,


Thanks for the welcome, and the reply!

Waiting Quote is a calculated number.


I'll try what you suggested and see how I go with it



Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

Terms of Use