terpsichore
asked on
Date range overlap - number of days
Dear experts -
There must be a function out there somewhere, but I can't find it -
I have two date ranges - with a start and an end date to each.
I would like to calculate the number of calendar days OVERLAP between the two ranges.
any ideas?
Thanks!
There must be a function out there somewhere, but I can't find it -
I have two date ranges - with a start and an end date to each.
I would like to calculate the number of calendar days OVERLAP between the two ranges.
any ideas?
Thanks!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
BTW, using the function will allow to insert some remarks and allow anyone who looks at the code six months or a year from now to figure out exactly what you were trying to do. Not so easy when you glom it all into a single DateDiff() function.
On the other hand, if your are using this in VBA rather than a query, you could simply document the code either way.
On the other hand, if your are using this in VBA rather than a query, you could simply document the code either way.
ASKER