PC Review


Reply
Thread Tools Rate Thread

Calculating number of days between two dates that fall between two other dates

 
 
richard.goodger@gmail.com
Guest
Posts: n/a
 
      26th Oct 2005
Hi,


I would like to know how i can calculate the number of days between two

dates that fall between another two dates (ie callender quarters)


Eg


Q1 1/1/2005 - 31/3/2005 (these dates can be variables, Q1,Q2.. etc)


1/1/2005 - 31/12/2005 What number of days between these two dates would

fall between the dates above?


Can anyone help please


Cheers!!!

 
Reply With Quote
 
 
 
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      26th Oct 2005
If A1 has the start date and B1 has the later date then =B1-A1 will yield the
number of days if formatted as General.
--
Gary''s Student


"(E-Mail Removed)" wrote:

> Hi,
>
>
> I would like to know how i can calculate the number of days between two
>
> dates that fall between another two dates (ie callender quarters)
>
>
> Eg
>
>
> Q1 1/1/2005 - 31/3/2005 (these dates can be variables, Q1,Q2.. etc)
>
>
> 1/1/2005 - 31/12/2005 What number of days between these two dates would
>
> fall between the dates above?
>
>
> Can anyone help please
>
>
> Cheers!!!
>
>

 
Reply With Quote
 
Roger Govier
Guest
Posts: n/a
 
      26th Oct 2005
Hi Richard

One way
=MIN(DATE(2005,3,31),DATE(2005,12,31))-DATE(2005,1,1)

or with your Start date in A1, End Date in A2 and your Quarter End Date in B1

=MIN(A2,B1)-A1


Regards

Roger Govier


(E-Mail Removed) wrote:
> Hi,
>
>
> I would like to know how i can calculate the number of days between two
>
> dates that fall between another two dates (ie callender quarters)
>
>
> Eg
>
>
> Q1 1/1/2005 - 31/3/2005 (these dates can be variables, Q1,Q2.. etc)
>
>
> 1/1/2005 - 31/12/2005 What number of days between these two dates would
>
> fall between the dates above?
>
>
> Can anyone help please
>
>
> Cheers!!!
>

 
Reply With Quote
 
TP
Guest
Posts: n/a
 
      26th Oct 2005
Roger,

I cant get either of the above to work. I am trying to calculate the
number of days in one range that fall in another range. It is for the
purposes of insurance, there are several policies that start at
different time throughout the year, but for accounting purposes the
quarters remain rigid to the cal. year.

so how do i calcualate how many days fall in q1 of2 006 from a policy
that say incepts on the 1/6/05 and expires on 31/05/2006

Thanks for all your help

 
Reply With Quote
 
Roger Govier
Guest
Posts: n/a
 
      26th Oct 2005
Hi

Then try this
In cells B1:J1 enter 01/01/05, 31/03/05, 30/06/05, etc. through to 31/12/06
In cell A2 enter your start date 01/06/05
In cell A3 enter your end date 31/05/06

In cell C3 enter the following
=(MIN(C$1,$A$3)-B$1)*--($A$2<=B$1)*--($A$3>=B$1)+(C$1-$A$2)*--($A$2<C$1)*($A$2>B$1)
Copy across through D3:J3
This will then show the number of days falling in each Quarter
If you want, you can enter the following in cell B3 to give the total duration
=SUM(C3:J3)

Clearly you can extend the range of quarters on for further years, or
following the same principle you could put your start and end dates on the
same line by inserting a new column B and putting the end date into B2. Just
change all references from $A$3 to $B$2.

Regards

Roger Govier


TP wrote:
> Roger,
>
> I cant get either of the above to work. I am trying to calculate the
> number of days in one range that fall in another range. It is for the
> purposes of insurance, there are several policies that start at
> different time throughout the year, but for accounting purposes the
> quarters remain rigid to the cal. year.
>
> so how do i calcualate how many days fall in q1 of2 006 from a policy
> that say incepts on the 1/6/05 and expires on 31/05/2006
>
> Thanks for all your help
>

 
Reply With Quote
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      26th Oct 2005
Another approach to consider is to take the MAX of the start date and the
quarter start date and subtract that from the MIN of the end date and the
quarter end date.
--
Gary''s Student


"TP" wrote:

> Roger,
>
> I cant get either of the above to work. I am trying to calculate the
> number of days in one range that fall in another range. It is for the
> purposes of insurance, there are several policies that start at
> different time throughout the year, but for accounting purposes the
> quarters remain rigid to the cal. year.
>
> so how do i calcualate how many days fall in q1 of2 006 from a policy
> that say incepts on the 1/6/05 and expires on 31/05/2006
>
> Thanks for all your help
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating the Number of Days between two dates thornem10@yahoo.co.uk Microsoft Access Queries 2 21st Jul 2008 12:24 AM
How do I get a number count of dates that fall between specific dates JohnB Microsoft Excel Discussion 3 3rd Jun 2004 03:26 PM
Calculating number of days between dates =?Utf-8?B?U292?= Microsoft Excel Misc 2 10th Mar 2004 07:29 PM
calculating number of days between two dates sandy Microsoft Excel Worksheet Functions 3 17th Sep 2003 04:23 AM
Calculating the Number of Days Between Two Dates Paul Microsoft Access Database Table Design 2 2nd Aug 2003 12:33 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:52 AM.