I would like to calculate the number of working days (not weekend days) between a start and end date, e.g. the number of days someone has been on annual leave/sick.
I have found several extremely complicated formulae which I couldn't recreate in a calculated field, including this suggestion for a Salesforce.com formulae which I can't recreate because there is no MOD function in Sugar.
(5 * ( FLOOR( ( date_1 - DATE( 1900, 1, 8) ) / 7 ) ) + MIN( 5, MOD( date_1 - DATE( 1900, 1, 8), 7 ) ) ) - (5 * ( FLOOR( ( date_2 - DATE( 1900, 1, 8) ) / 7 ) ) + MIN( 5, MOD( date_2 - DATE( 1900, 1, 8), 7 ) ) )
It seems that there is a function called WORKDAY in Excel which would also help...
Please Sugar, can you give us some way of doing it? Preferably one function which does it for us!