PDA

View Full Version : dates between dates???



saban
06-08-2006, 08:24 AM
Does anyone have any slightest idea how to solve this:

How many days between dates 22/05/2006 - 28/05/2006 represents this range of dates
24/05/2006 - 29/05/2006

in other words How many days from date 24/05/2006 - 28/05/2006 are actually in between from 22/05/2006 to 29/05/2006

22/05/2006 - 28/05/2006 is like (22/05/06,23/05/06,24/05/2006 and so on) but weekends should be excluded

any ideas?
thnx

Bob Phillips
06-08-2006, 10:35 AM
Don't get it. Can you post an example?

austenr
06-08-2006, 12:22 PM
Bob,

I think he needs the function NETWORKDAYS.

Assume the start date in A1 = 1/1/2006
The end date in B1 = 12/31/2006
IN C1 ENTER THIS FUNCTION =NETWORKDAYS(A1,B1)
THE RESULT IS 260

Jacob Hilderbrand
06-08-2006, 01:32 PM
NETWORKDAYS is partially correct, but we will also need to determine the true start and end date.

A1 = 22/5/2006 (Start Date)
B1 = 28/5/2006 (End Date)

C1 = 24/5/2006 (Date Range Start Date)
D1 = 29/5/2006 (Date Range End Date)

So we have a date range in A1 and B1 and want to see how many days are inbetween the dates in C1 and D1. First we need to find the combined date range that matches our criteria.

C2 = IF(C1<A1,A1,C1)
D2 = IF(D1>B1,B1,D1)

D3 = NETWORKDAYS(C2,D2)

Or

D3 = NETWORKDAYS(IF(C1<A1,A1,C1),IF(D1>B1,B1,D1))

To use NETWORKDAYS you will need to install the Analysis ToolPak (Tools | Add-Ins...).

austenr
06-08-2006, 01:36 PM
Sorry Jake. Forgot to mention that part...

saban
06-09-2006, 01:43 AM
thnx guys for your help really apreciate it

I neede something like DRJ wrote
It is like this if one translator who has one document to translate let say till 22/06/2006 and he got that document 16/06/2006 so the start date of job is 16/06/2006 and deadline is 22/06/2006 and inbetween he goes for a holidays from 19/06/2006 till 25/06/2006 now i need infromation how many days is he on holidays for that document so i need result 4 because there are 4 days between 19/06/2006 and 22/06/2006

Bob Phillips
06-09-2006, 01:46 AM
That is jsut standard Networkdays

=Networkdays(start_date,end_date,holidays)

where holidays is a range of all holiday dates

saban
06-09-2006, 03:16 AM
I dont quite get it could you show me what you mean if I post an example of my workbook

Bob Phillips
06-09-2006, 07:58 AM
I'm afraid that clarified nothing for me.

Jacob Hilderbrand
06-10-2006, 11:30 AM
Your attachment is not really clear. At any rate, take a look at this attachment.

Also note that believe by Holiday, he means Vacation and not an actual Holiday.

Bob Phillips
06-10-2006, 01:55 PM
Also note that believe by Holiday, he means Vacation and not an actual Holiday.

That was the one bit I did get.