Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6245 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Should hopefully be a very quick one here for one of you super clever dudes!

Is there a calculation that will give the total number of week days (excluding weekends within a given period?

Posted

If ( Date1 and Date2 ) ;

Let ( [

spanStart = Date1 - Mod ( Date1 ; 7 ) ;

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

wkndCount = Div ( spanEnd - spanStart + 1 ; 7 ) * 2 - (spanStart < Date1 ) - ( spanEnd > Date2 )

] ;

Date2 - Date1 + 1 - wkndCount

)

)

Posted

Indeed, but Michael's CF is slightly more flexible:

http://www.briandunning.com/cf/452

If you put ValueCount( around it.... it could then be made to deal with regular days off as well!

--sd

Posted

Tried your calculation replacing date1 and date2 in your calculation with the 'from' and 'to' dates in my database but the first line is coming up with the 'There are too few parameters in this function' message!

Posted

I don't think you need to use a recursive calculation for this. If you want the flexibility of being able to select which days are considered weekends, see here:

http://www.fmforums.com/forum/showtopic.php?tid/155958/post/156042/#156042

This topic is 6245 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.