Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count days between two dates??

Status
Not open for further replies.

Snooker07

Technical User
Nov 11, 2008
6
US
Hello and thank you!

I am sure this will be very simple for most all of you.

I need to count days beween two date ranges excluding weekends, for example:

04/28/2009 to 04/30/2009 Result should be 2


04/28/2009 to 05/04/2009 Result should be 3

Thank you and much appreciated.

Snooker

 


Hi,

Check out Analysis ToolPak add-in NETWORKDAYS function.

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Have a look at NetWorkDays.

But notice that it would return 3 for your first example because it counts:
1) 04/28/2009
2) 04/29/2009
3) 04/30/2009

If you want to ignore the first day, then just subtract one.

[tt][blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top