Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / November 2006

Tip: Looking for answers? Try searching our database.

Days between 2 dates

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Linda RQ - 28 Nov 2006 14:53 GMT
Hi Everyone,

Using Excel 2003.  What function or formula would I use in Cell C1 to get
the count number of days between these two dates.  If the time in Cell A1 is
PM, we don't want that day counted.

Cell A1
5/30/06@2:15am

Cell B1
6/19/06@6:16pm

Thanks,
Linda
Sloth - 28 Nov 2006 15:14 GMT
=INT(B1-C1)

you will have to format the cell as a number after putting in the formula.

> Hi Everyone,
>
[quoted text clipped - 10 lines]
> Thanks,
> Linda
Sloth - 28 Nov 2006 15:30 GMT
Ooops I meant to say...
=INT(B1-A1)
but that's not really what you want is it?  Try this one
=DATEDIF(A1,B1,"D")-(HOUR(A1)>11)

> =INT(B1-C1)
>
[quoted text clipped - 14 lines]
> > Thanks,
> > Linda
Bob Phillips - 28 Nov 2006 15:42 GMT
Why not just

=INT(B1-A1)-(HOUR(A1)>11)

but reading the OP, perrhaps it should be

=INT(B1-A1)+(HOUR(A1)<=11)

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

> Ooops I meant to say...
> =INT(B1-A1)
[quoted text clipped - 19 lines]
> > > Thanks,
> > > Linda
Sloth - 28 Nov 2006 19:01 GMT
It really depends on the OP's preference really.  Look at the following
examples to see why I went with DATEDIF...

5/30/2006 2:15 AM
6/19/2006 1:15 AM
=INT(B1-A1) -> 19
=DATEDIF(A1,B1,"D") -> 20

5/30/2006 2:15 AM
6/19/2006 3:15 AM
=INT(B1-A1) -> 20
=DATEDIF(A1,B1,"D") -> 20

> Why not just
>
[quoted text clipped - 38 lines]
> > > > Thanks,
> > > > Linda
JE McGimpsey - 28 Nov 2006 15:39 GMT
One way:

   =INT(B1-ROUND(A1,0))

   =BIn article <uaMg0zvEHHA.1748@TK2MSFTNGP02.phx.gbl>,

> Hi Everyone,
>
[quoted text clipped - 10 lines]
> Thanks,
> Linda
daddylonglegs - 28 Nov 2006 23:41 GMT
So, what's the answer for the example you give, Linda?

> Hi Everyone,
>
[quoted text clipped - 10 lines]
> Thanks,
> Linda
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.