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 / September 2007

Tip: Looking for answers? Try searching our database.

Difference in dates in Excel 2007

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pcor - 25 Sep 2007 18:18 GMT
Cell b1= 25 Sept 2007
Cell b2= 23 Sept 2007
Both cells are formatted as shown
With the following formula in B3 (B1-b2) I get answer of 3. I thought the
answer would be 2.
Can you tell me why oir how to fix it
Thanks
JE McGimpsey - 25 Sep 2007 18:29 GMT
If you format the cells as General, do they have a fractional part? XL
stores date/times as integer/fractions, and calculations depend only on
the stored values, not the displayed values.

So, for instance, if

B1:     25 Sept 2007 23:59
B2:     23 Sept 2007 00:00
B3:     =B1-B2                  ===> 2.999305556

which will round to 3 if less than 3 decimals are specified.

> Cell b1= 25 Sept 2007
> Cell b2= 23 Sept 2007
[quoted text clipped - 3 lines]
> Can you tell me why oir how to fix it
> Thanks
Peo Sjoblom - 25 Sep 2007 18:30 GMT
Formatted yes but what do the cells contain?

Put this in D1 and copy down to D2

=TEXT(B1,"General")

or just format B3 as general

Signature

Regards,

Peo Sjoblom

> Cell b1= 25 Sept 2007
> Cell b2= 23 Sept 2007
[quoted text clipped - 3 lines]
> Can you tell me why oir how to fix it
> Thanks
Bob Phillips - 25 Sep 2007 18:34 GMT
It's 2 in mine. Are you sure you don't have times as well which takes it up
to 2.nnn such that it displays rounded up?
Signature

HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

> Cell b1= 25 Sept 2007
> Cell b2= 23 Sept 2007
[quoted text clipped - 3 lines]
> Can you tell me why oir how to fix it
> Thanks
pcor - 25 Sep 2007 18:44 GMT
I guess I misled all of you in B1 I have  =@now()..Which turns out to ne 25
Sept 2007.
My question is this : What do I haveto do to  get the answer 2
Thanks

> Cell b1= 25 Sept 2007
> Cell b2= 23 Sept 2007
[quoted text clipped - 3 lines]
> Can you tell me why oir how to fix it
> Thanks
JE McGimpsey - 25 Sep 2007 18:46 GMT
How about:

B1:     =TODAY()

instead?

> I guess I misled all of you in B1 I have  =@now()..Which turns out to ne 25
> Sept 2007.
> My question is this : What do I haveto do to  get the answer 2
Peo Sjoblom - 25 Sep 2007 18:47 GMT
Use TODAY() instead of NOW() or if you need NOW in some other calculation
use

=INT(B1)-INT(B2)

Signature

Regards,

Peo Sjoblom

>I guess I misled all of you in B1 I have  =@now()..Which turns out to ne 25
> Sept 2007.
[quoted text clipped - 8 lines]
>> Can you tell me why oir how to fix it
>> Thanks
pcor - 25 Sep 2007 21:14 GMT
That did it real well. Many thanks to all
I really appreciate the good help I can get here. Thanks again

> Use TODAY() instead of NOW() or if you need NOW in some other calculation
> use
[quoted text clipped - 13 lines]
> >> Can you tell me why oir how to fix it
> >> Thanks

Rate this thread:






 
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.