Is this a bug in Excel 2007?

I

IT Olson

I am trying to do countdown calculations. The numbers look good except my
months are off by one in the display.
If I calculate =now()-now() I get 1/0/00 0:00 (US date time format).
If I subtract 7/22/08 9:00 from 7/31/08 9:00 I get 1/8/00 0:00 and there is
obviously not a month and 8 days difference.

I did a count up timer from my date of birth and my birthday...on my
birthday I will be 30/12/31 ...okay I can see that. The day after I will be
31/1/1

I thought about the "There is no 0 month" however, it does calculate a 0
year AND a 0 day. Plus this is a calculation of how much time has gone by...0
months have gone by.

If some one knows the fix (or can confirm this is a bug) i would appreciate
it.
 
D

daddylonglegs

The format you're using is really for dates not elapsed time, so you don't
get month zero (OK you get year zero which is 1900 but you only get day zero
when the days difference is zero), you get the elapsed time as a date, e.g.
if the difference is 8 days you are actually formatting day 8 in the excel
calendar - 8th Jan 1900, hence 1/8/00

You could try DATEDIF for years, months and days, e.g. with your birthday in
A1 and today's date in B1

=DATEDIF(A1,B1,"y")&" years "&DATEDIF(A1,B1,"ym")&" months
"&DATEDIF(A1,B1,"md")&" days"

If you want to include a time element then concatenate an extra part at the
end

&TEXT(B1-A1," h:mm")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top