Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
KimberlyC
 
Posts: n/a
Default Subracting Dates to come up with the # of days between them

Hi

I have a "From" Date in Col C and and "To" Date in Col D.
In Col E, I have entred the following formula to calc. the number of days
between them =DATEDIF(C10,D10,"D")
( I'm trying to find the number of days each employee worked for the year
( weekends do not matter..they are supposed to be included in this total
number))

If I have (for ex) 11/1/2004 in C10 and 12/1/2004 in D10, the answer I get
in E10 = 30.
The days should be 31 ( 30 days in Nov and 1 day in Dec).

Is there a different formula I should be using to get the correct days I'm
looking for.....


Thanks in advance for your help!!
Kimberly :)


  #2   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
then use
=DATEDIF(C10,D10,"D")+1

--
Regards
Frank Kabel
Frankfurt, Germany
"KimberlyC" schrieb im Newsbeitrag
...
Hi

I have a "From" Date in Col C and and "To" Date in Col D.
In Col E, I have entred the following formula to calc. the number of days
between them =DATEDIF(C10,D10,"D")
( I'm trying to find the number of days each employee worked for the year
( weekends do not matter..they are supposed to be included in this total
number))

If I have (for ex) 11/1/2004 in C10 and 12/1/2004 in D10, the answer I
get
in E10 = 30.
The days should be 31 ( 30 days in Nov and 1 day in Dec).

Is there a different formula I should be using to get the correct days I'm
looking for.....


Thanks in advance for your help!!
Kimberly :)




  #3   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

Not that it makes any difference but since you want to count days you might
as well use

=D10-C10 format as general

and since you want to add one day use

=D10-C10+1

Regards,

Peo Sjoblom

"KimberlyC" wrote:

Hi

I have a "From" Date in Col C and and "To" Date in Col D.
In Col E, I have entred the following formula to calc. the number of days
between them =DATEDIF(C10,D10,"D")
( I'm trying to find the number of days each employee worked for the year
( weekends do not matter..they are supposed to be included in this total
number))

If I have (for ex) 11/1/2004 in C10 and 12/1/2004 in D10, the answer I get
in E10 = 30.
The days should be 31 ( 30 days in Nov and 1 day in Dec).

Is there a different formula I should be using to get the correct days I'm
looking for.....


Thanks in advance for your help!!
Kimberly :)



  #4   Report Post  
KimberlyC
 
Posts: n/a
Default

Hi,
Thanks...
This works, but when I have 1/1/2004 to 12/31/2004...the days are coming up
to 366 instead of 365
But the 11/1/2004 to 12/1/2004 comes up with 31 days..which is correct.
It appears the formula works correctly for the month to month dates...(like
11/1/2004 to 12/30/2004)...but it adds one to many days on the calendar year
dates
such as 1/1/2004 to 12/31/2004.
If I enter 4/1/2004 to 3/31/2005... I come up with 365.. so it appears it
only happens when it's the cal. year.???

Not sure how to resolve that one..
Any advise would be greatly appreicated.

"Frank Kabel" wrote in message
...
Hi
then use
=DATEDIF(C10,D10,"D")+1

--
Regards
Frank Kabel
Frankfurt, Germany
"KimberlyC" schrieb im Newsbeitrag
...
Hi

I have a "From" Date in Col C and and "To" Date in Col D.
In Col E, I have entred the following formula to calc. the number of

days
between them =DATEDIF(C10,D10,"D")
( I'm trying to find the number of days each employee worked for the

year
( weekends do not matter..they are supposed to be included in this total
number))

If I have (for ex) 11/1/2004 in C10 and 12/1/2004 in D10, the answer I
get
in E10 = 30.
The days should be 31 ( 30 days in Nov and 1 day in Dec).

Is there a different formula I should be using to get the correct days

I'm
looking for.....


Thanks in advance for your help!!
Kimberly :)






  #5   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
you know that 2004 is a leap year? so 366 is correct :-)

--
Regards
Frank Kabel
Frankfurt, Germany
"KimberlyC" schrieb im Newsbeitrag
...
Hi,
Thanks...
This works, but when I have 1/1/2004 to 12/31/2004...the days are coming
up
to 366 instead of 365
But the 11/1/2004 to 12/1/2004 comes up with 31 days..which is correct.
It appears the formula works correctly for the month to month
dates...(like
11/1/2004 to 12/30/2004)...but it adds one to many days on the calendar
year
dates
such as 1/1/2004 to 12/31/2004.
If I enter 4/1/2004 to 3/31/2005... I come up with 365.. so it appears it
only happens when it's the cal. year.???

Not sure how to resolve that one..
Any advise would be greatly appreicated.

"Frank Kabel" wrote in message
...
Hi
then use
=DATEDIF(C10,D10,"D")+1

--
Regards
Frank Kabel
Frankfurt, Germany
"KimberlyC" schrieb im Newsbeitrag
...
Hi

I have a "From" Date in Col C and and "To" Date in Col D.
In Col E, I have entred the following formula to calc. the number of

days
between them =DATEDIF(C10,D10,"D")
( I'm trying to find the number of days each employee worked for the

year
( weekends do not matter..they are supposed to be included in this
total
number))

If I have (for ex) 11/1/2004 in C10 and 12/1/2004 in D10, the answer I
get
in E10 = 30.
The days should be 31 ( 30 days in Nov and 1 day in Dec).

Is there a different formula I should be using to get the correct days

I'm
looking for.....


Thanks in advance for your help!!
Kimberly :)










  #6   Report Post  
Gord Dibben
 
Posts: n/a
Default

Kimberly

Are you forgetting that 2004 is a Leap Year and has 29 days in February?

Gord Dibben Excel MVP

On Mon, 20 Dec 2004 11:31:13 -0800, "KimberlyC"
wrote:

Hi,
Thanks...
This works, but when I have 1/1/2004 to 12/31/2004...the days are coming up
to 366 instead of 365
But the 11/1/2004 to 12/1/2004 comes up with 31 days..which is correct.
It appears the formula works correctly for the month to month dates...(like
11/1/2004 to 12/30/2004)...but it adds one to many days on the calendar year
dates
such as 1/1/2004 to 12/31/2004.
If I enter 4/1/2004 to 3/31/2005... I come up with 365.. so it appears it
only happens when it's the cal. year.???

Not sure how to resolve that one..
Any advise would be greatly appreicated.

"Frank Kabel" wrote in message
...
Hi
then use
=DATEDIF(C10,D10,"D")+1

--
Regards
Frank Kabel
Frankfurt, Germany
"KimberlyC" schrieb im Newsbeitrag
...
Hi

I have a "From" Date in Col C and and "To" Date in Col D.
In Col E, I have entred the following formula to calc. the number of

days
between them =DATEDIF(C10,D10,"D")
( I'm trying to find the number of days each employee worked for the

year
( weekends do not matter..they are supposed to be included in this total
number))

If I have (for ex) 11/1/2004 in C10 and 12/1/2004 in D10, the answer I
get
in E10 = 30.
The days should be 31 ( 30 days in Nov and 1 day in Dec).

Is there a different formula I should be using to get the correct days

I'm
looking for.....


Thanks in advance for your help!!
Kimberly :)






  #7   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

Use

=MAX(B1-A1+1,365)

Regards,

Peo Sjoblom

"KimberlyC" wrote:

Hi,
Thanks...
This works, but when I have 1/1/2004 to 12/31/2004...the days are coming up
to 366 instead of 365
But the 11/1/2004 to 12/1/2004 comes up with 31 days..which is correct.
It appears the formula works correctly for the month to month dates...(like
11/1/2004 to 12/30/2004)...but it adds one to many days on the calendar year
dates
such as 1/1/2004 to 12/31/2004.
If I enter 4/1/2004 to 3/31/2005... I come up with 365.. so it appears it
only happens when it's the cal. year.???

Not sure how to resolve that one..
Any advise would be greatly appreicated.

"Frank Kabel" wrote in message
...
Hi
then use
=DATEDIF(C10,D10,"D")+1

--
Regards
Frank Kabel
Frankfurt, Germany
"KimberlyC" schrieb im Newsbeitrag
...
Hi

I have a "From" Date in Col C and and "To" Date in Col D.
In Col E, I have entred the following formula to calc. the number of

days
between them =DATEDIF(C10,D10,"D")
( I'm trying to find the number of days each employee worked for the

year
( weekends do not matter..they are supposed to be included in this total
number))

If I have (for ex) 11/1/2004 in C10 and 12/1/2004 in D10, the answer I
get
in E10 = 30.
The days should be 31 ( 30 days in Nov and 1 day in Dec).

Is there a different formula I should be using to get the correct days

I'm
looking for.....


Thanks in advance for your help!!
Kimberly :)







  #8   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi Peo
that's a nice workaround :-))

--
Regards
Frank Kabel
Frankfurt, Germany
"Peo Sjoblom" schrieb im Newsbeitrag
...
Use

=MAX(B1-A1+1,365)

Regards,

Peo Sjoblom

"KimberlyC" wrote:

Hi,
Thanks...
This works, but when I have 1/1/2004 to 12/31/2004...the days are coming
up
to 366 instead of 365
But the 11/1/2004 to 12/1/2004 comes up with 31 days..which is correct.
It appears the formula works correctly for the month to month
dates...(like
11/1/2004 to 12/30/2004)...but it adds one to many days on the calendar
year
dates
such as 1/1/2004 to 12/31/2004.
If I enter 4/1/2004 to 3/31/2005... I come up with 365.. so it appears it
only happens when it's the cal. year.???

Not sure how to resolve that one..
Any advise would be greatly appreicated.

"Frank Kabel" wrote in message
...
Hi
then use
=DATEDIF(C10,D10,"D")+1

--
Regards
Frank Kabel
Frankfurt, Germany
"KimberlyC" schrieb im Newsbeitrag
...
Hi

I have a "From" Date in Col C and and "To" Date in Col D.
In Col E, I have entred the following formula to calc. the number of

days
between them =DATEDIF(C10,D10,"D")
( I'm trying to find the number of days each employee worked for the

year
( weekends do not matter..they are supposed to be included in this
total
number))

If I have (for ex) 11/1/2004 in C10 and 12/1/2004 in D10, the answer
I
get
in E10 = 30.
The days should be 31 ( 30 days in Nov and 1 day in Dec).

Is there a different formula I should be using to get the correct
days

I'm
looking for.....


Thanks in advance for your help!!
Kimberly :)









  #9   Report Post  
KimberlyC
 
Posts: n/a
Default

Oh Dear! :)
I did forget!!
Thanks so much for you help...
"Frank Kabel" wrote in message
...
Hi
you know that 2004 is a leap year? so 366 is correct :-)

--
Regards
Frank Kabel
Frankfurt, Germany
"KimberlyC" schrieb im Newsbeitrag
...
Hi,
Thanks...
This works, but when I have 1/1/2004 to 12/31/2004...the days are coming
up
to 366 instead of 365
But the 11/1/2004 to 12/1/2004 comes up with 31 days..which is correct.
It appears the formula works correctly for the month to month
dates...(like
11/1/2004 to 12/30/2004)...but it adds one to many days on the calendar
year
dates
such as 1/1/2004 to 12/31/2004.
If I enter 4/1/2004 to 3/31/2005... I come up with 365.. so it appears

it
only happens when it's the cal. year.???

Not sure how to resolve that one..
Any advise would be greatly appreicated.

"Frank Kabel" wrote in message
...
Hi
then use
=DATEDIF(C10,D10,"D")+1

--
Regards
Frank Kabel
Frankfurt, Germany
"KimberlyC" schrieb im Newsbeitrag
...
Hi

I have a "From" Date in Col C and and "To" Date in Col D.
In Col E, I have entred the following formula to calc. the number of

days
between them =DATEDIF(C10,D10,"D")
( I'm trying to find the number of days each employee worked for the

year
( weekends do not matter..they are supposed to be included in this
total
number))

If I have (for ex) 11/1/2004 in C10 and 12/1/2004 in D10, the answer

I
get
in E10 = 30.
The days should be 31 ( 30 days in Nov and 1 day in Dec).

Is there a different formula I should be using to get the correct

days
I'm
looking for.....


Thanks in advance for your help!!
Kimberly :)










Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formating Dates for production schedule dpl7579 Excel Discussion (Misc queries) 1 January 11th 05 09:43 PM
due dates Niki New Users to Excel 4 January 10th 05 05:11 PM
How do I find how many business days are between two dates S trainer Excel Worksheet Functions 2 December 15th 04 08:30 PM
Help! I am stuck calculating Days, Hours, Mins please help OB1 Excel Worksheet Functions 3 November 15th 04 06:17 PM
Difference between two dates in months with decimals effem Excel Worksheet Functions 3 November 5th 04 06:23 PM


All times are GMT +1. The time now is 05:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"