PC Review


Reply
Thread Tools Rate Thread

counting weeks and days between dates

 
 
pilgrimm@agr.gc.ca
Guest
Posts: n/a
 
      26th Sep 2007
I need a formula that will give me the total number of weeks and days
between 2 dates. ie. b3=Apr-2,2001, c3=Oct.31,2001 what is the
total number of weeks and days between these dates.

I have the formula to get the number of weeks but have trouble getting
the number of days left to show.

I have so far: =INT((C3-B3)/7) to get the weeks.

When I count out the numbers, I get 3 calendar days left. But if I
simply use the total number of days between B3 and C3 less number of
weeks times 7 I get 2 days. It is out 1 day.

Any ideas on how to make it more accurate?
thx all

Mel

 
Reply With Quote
 
 
 
 
JW
Guest
Posts: n/a
 
      26th Sep 2007
One way:
Weeks: "&INT((C3-B3)/7)&" Days: "&(C3-B3)-INT((C3-B3)/7)*7

Another way:
="Weeks: "&INT(DATEDIF(B3,C3,"d")/7)&" Days: "&DATEDIF(B3,C3,"d")-
INT((C3-B3)/7)*7
pilgr...@agr.gc.ca wrote:
> I need a formula that will give me the total number of weeks and days
> between 2 dates. ie. b3=Apr-2,2001, c3=Oct.31,2001 what is the
> total number of weeks and days between these dates.
>
> I have the formula to get the number of weeks but have trouble getting
> the number of days left to show.
>
> I have so far: =INT((C3-B3)/7) to get the weeks.
>
> When I count out the numbers, I get 3 calendar days left. But if I
> simply use the total number of days between B3 and C3 less number of
> weeks times 7 I get 2 days. It is out 1 day.
>
> Any ideas on how to make it more accurate?
> thx all
>
> Mel


 
Reply With Quote
 
JW
Guest
Posts: n/a
 
      26th Sep 2007
Sorry. Left the =" off of the first way.
="Weeks: "&INT((C3-B3)/7)&" Days: "&(C3-B3)-INT((C3-B3)/7)*7

JW wrote:
> One way:
> Weeks: "&INT((C3-B3)/7)&" Days: "&(C3-B3)-INT((C3-B3)/7)*7
>
> Another way:
> ="Weeks: "&INT(DATEDIF(B3,C3,"d")/7)&" Days: "&DATEDIF(B3,C3,"d")-
> INT((C3-B3)/7)*7
> pilgr...@agr.gc.ca wrote:
> > I need a formula that will give me the total number of weeks and days
> > between 2 dates. ie. b3=Apr-2,2001, c3=Oct.31,2001 what is the
> > total number of weeks and days between these dates.
> >
> > I have the formula to get the number of weeks but have trouble getting
> > the number of days left to show.
> >
> > I have so far: =INT((C3-B3)/7) to get the weeks.
> >
> > When I count out the numbers, I get 3 calendar days left. But if I
> > simply use the total number of days between B3 and C3 less number of
> > weeks times 7 I get 2 days. It is out 1 day.
> >
> > Any ideas on how to make it more accurate?
> > thx all
> >
> > Mel


 
Reply With Quote
 
pilgrimm@agr.gc.ca
Guest
Posts: n/a
 
      26th Sep 2007
On Sep 26, 11:42 am, JW <JWRIGH...@triad.rr.com> wrote:
> Sorry. Left the =" off of the first way.
> ="Weeks: "&INT((C3-B3)/7)&" Days: "&(C3-B3)-INT((C3-B3)/7)*7
>
>
>
> JW wrote:
> > One way:
> > Weeks: "&INT((C3-B3)/7)&" Days: "&(C3-B3)-INT((C3-B3)/7)*7

>
> > Another way:
> > ="Weeks: "&INT(DATEDIF(B3,C3,"d")/7)&" Days: "&DATEDIF(B3,C3,"d")-
> > INT((C3-B3)/7)*7
> > pilgr...@agr.gc.ca wrote:
> > > I need a formula that will give me the total number of weeks and days
> > > between 2 dates. ie. b3=Apr-2,2001, c3=Oct.31,2001 what is the
> > > total number of weeks and days between these dates.

>
> > > I have the formula to get the number of weeks but have trouble getting
> > > the number of days left to show.

>
> > > I have so far: =INT((C3-B3)/7) to get the weeks.

>
> > > When I count out the numbers, I get 3 calendar days left. But if I
> > > simply use the total number of days between B3 and C3 less number of
> > > weeks times 7 I get 2 days. It is out 1 day.

>
> > > Any ideas on how to make it more accurate?
> > > thx all

>
> > > Mel- Hide quoted text -

>
> - Show quoted text -


works great.
thx once again.

 
Reply With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      26th Sep 2007
That is because when you subtract the start day from the end day, you don't
count the start day. you need to do your calculations with

=INT((C3-B3+1)/7)

=mod((c3-B3+1),7)

that give me 30 weeks and 3 days.

--
Regards,
Tom Ogilvy


"(E-Mail Removed)" wrote:

> I need a formula that will give me the total number of weeks and days
> between 2 dates. ie. b3=Apr-2,2001, c3=Oct.31,2001 what is the
> total number of weeks and days between these dates.
>
> I have the formula to get the number of weeks but have trouble getting
> the number of days left to show.
>
> I have so far: =INT((C3-B3)/7) to get the weeks.
>
> When I count out the numbers, I get 3 calendar days left. But if I
> simply use the total number of days between B3 and C3 less number of
> weeks times 7 I get 2 days. It is out 1 day.
>
> Any ideas on how to make it more accurate?
> thx all
>
> Mel
>
>

 
Reply With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      26th Sep 2007
For your sample, both JW's suggestions gave me 30 weeks and 2 days - I
thought you said that was your problem - you wanted 3 days. Go figure???

--
Regards,
Tom Ogilvy


"(E-Mail Removed)" wrote:

> On Sep 26, 11:42 am, JW <JWRIGH...@triad.rr.com> wrote:
> > Sorry. Left the =" off of the first way.
> > ="Weeks: "&INT((C3-B3)/7)&" Days: "&(C3-B3)-INT((C3-B3)/7)*7
> >
> >
> >
> > JW wrote:
> > > One way:
> > > Weeks: "&INT((C3-B3)/7)&" Days: "&(C3-B3)-INT((C3-B3)/7)*7

> >
> > > Another way:
> > > ="Weeks: "&INT(DATEDIF(B3,C3,"d")/7)&" Days: "&DATEDIF(B3,C3,"d")-
> > > INT((C3-B3)/7)*7
> > > pilgr...@agr.gc.ca wrote:
> > > > I need a formula that will give me the total number of weeks and days
> > > > between 2 dates. ie. b3=Apr-2,2001, c3=Oct.31,2001 what is the
> > > > total number of weeks and days between these dates.

> >
> > > > I have the formula to get the number of weeks but have trouble getting
> > > > the number of days left to show.

> >
> > > > I have so far: =INT((C3-B3)/7) to get the weeks.

> >
> > > > When I count out the numbers, I get 3 calendar days left. But if I
> > > > simply use the total number of days between B3 and C3 less number of
> > > > weeks times 7 I get 2 days. It is out 1 day.

> >
> > > > Any ideas on how to make it more accurate?
> > > > thx all

> >
> > > > Mel- Hide quoted text -

> >
> > - Show quoted text -

>
> works great.
> thx once again.
>
>

 
Reply With Quote
 
JW
Guest
Posts: n/a
 
      26th Sep 2007
I know what you mean Tom. I was a little thrown off by his
description as well.
I was just looking around and came across a page on Chip's site where
he has a pretty slick method of doing this. His method also worked
out to 30 weeks 2 days.
=TRUNC((C3-B3)/7)&" Weeks "&MOD(C3-B3,7)&" Days"

Tom Ogilvy wrote:
> For your sample, both JW's suggestions gave me 30 weeks and 2 days - I
> thought you said that was your problem - you wanted 3 days. Go figure???
>
> --
> Regards,
> Tom Ogilvy
>
>
> "(E-Mail Removed)" wrote:
>
> > On Sep 26, 11:42 am, JW <JWRIGH...@triad.rr.com> wrote:
> > > Sorry. Left the =" off of the first way.
> > > ="Weeks: "&INT((C3-B3)/7)&" Days: "&(C3-B3)-INT((C3-B3)/7)*7
> > >
> > >
> > >
> > > JW wrote:
> > > > One way:
> > > > Weeks: "&INT((C3-B3)/7)&" Days: "&(C3-B3)-INT((C3-B3)/7)*7
> > >
> > > > Another way:
> > > > ="Weeks: "&INT(DATEDIF(B3,C3,"d")/7)&" Days: "&DATEDIF(B3,C3,"d")-
> > > > INT((C3-B3)/7)*7
> > > > pilgr...@agr.gc.ca wrote:
> > > > > I need a formula that will give me the total number of weeks and days
> > > > > between 2 dates. ie. b3=Apr-2,2001, c3=Oct.31,2001 what is the
> > > > > total number of weeks and days between these dates.
> > >
> > > > > I have the formula to get the number of weeks but have trouble getting
> > > > > the number of days left to show.
> > >
> > > > > I have so far: =INT((C3-B3)/7) to get the weeks.
> > >
> > > > > When I count out the numbers, I get 3 calendar days left. But if I
> > > > > simply use the total number of days between B3 and C3 less number of
> > > > > weeks times 7 I get 2 days. It is out 1 day.
> > >
> > > > > Any ideas on how to make it more accurate?
> > > > > thx all
> > >
> > > > > Mel- Hide quoted text -
> > >
> > > - Show quoted text -

> >
> > works great.
> > thx once again.
> >
> >


 
Reply With Quote
 
Peter T
Guest
Posts: n/a
 
      26th Sep 2007
If your first date is the 1st of the month and your second date the 3rd,
that's 3 days if you count each of them but the difference between the dates
is of course 2.

If you want inclusive days, which it seems you do, add 1 to their
difference.

Consider two dates that fall on consecutive Mondays, for your purposes is
that a week or eight days.

Regards,
Peter T


"JW" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I know what you mean Tom. I was a little thrown off by his
> description as well.
> I was just looking around and came across a page on Chip's site where
> he has a pretty slick method of doing this. His method also worked
> out to 30 weeks 2 days.
> =TRUNC((C3-B3)/7)&" Weeks "&MOD(C3-B3,7)&" Days"
>
> Tom Ogilvy wrote:
> > For your sample, both JW's suggestions gave me 30 weeks and 2 days - I
> > thought you said that was your problem - you wanted 3 days. Go

figure???
> >
> > --
> > Regards,
> > Tom Ogilvy
> >
> >
> > "(E-Mail Removed)" wrote:
> >
> > > On Sep 26, 11:42 am, JW <JWRIGH...@triad.rr.com> wrote:
> > > > Sorry. Left the =" off of the first way.
> > > > ="Weeks: "&INT((C3-B3)/7)&" Days: "&(C3-B3)-INT((C3-B3)/7)*7
> > > >
> > > >
> > > >
> > > > JW wrote:
> > > > > One way:
> > > > > Weeks: "&INT((C3-B3)/7)&" Days: "&(C3-B3)-INT((C3-B3)/7)*7
> > > >
> > > > > Another way:
> > > > > ="Weeks: "&INT(DATEDIF(B3,C3,"d")/7)&" Days:

"&DATEDIF(B3,C3,"d")-
> > > > > INT((C3-B3)/7)*7
> > > > > pilgr...@agr.gc.ca wrote:
> > > > > > I need a formula that will give me the total number of weeks and

days
> > > > > > between 2 dates. ie. b3=Apr-2,2001, c3=Oct.31,2001 what is

the
> > > > > > total number of weeks and days between these dates.
> > > >
> > > > > > I have the formula to get the number of weeks but have trouble

getting
> > > > > > the number of days left to show.
> > > >
> > > > > > I have so far: =INT((C3-B3)/7) to get the weeks.
> > > >
> > > > > > When I count out the numbers, I get 3 calendar days left. But

if I
> > > > > > simply use the total number of days between B3 and C3 less

number of
> > > > > > weeks times 7 I get 2 days. It is out 1 day.
> > > >
> > > > > > Any ideas on how to make it more accurate?
> > > > > > thx all
> > > >
> > > > > > Mel- Hide quoted text -
> > > >
> > > > - Show quoted text -
> > >
> > > works great.
> > > thx once again.
> > >
> > >

>



 
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
Re: Counting days between 2 dates Peo Sjoblom Microsoft Excel Misc 0 19th Sep 2008 10:35 PM
counting weeks between 2 dates =?Utf-8?B?ZHdpbg==?= Microsoft Access 3 25th Oct 2006 04:37 PM
Calculate Number of Months Weeks and Days Between Two Dates riprussell@aol.com Microsoft Excel Worksheet Functions 4 22nd Sep 2006 01:47 AM
Counting Weeks or Days Kobra Microsoft Excel Discussion 4 13th Jun 2005 11:30 PM
calculating (correctly) the weeks and days between dates neon Microsoft Excel Worksheet Functions 4 28th Jun 2004 03:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:18 PM.