Calculating Dates

  • Thread starter Thread starter Drake
  • Start date Start date
D

Drake

Hi,

I need to construct a spreadsheet that will tell me how many days have
elapsed from x to the present.

An example would be if I put in A1

10/10/07

Then in B1 you sould see 30 days (or however many years)

A2

4/3/04

B2

3.5 years (or whatever)

Is there anyway to do that so it updates for on a daily basis?

Thanks a lot.
 
The =NOW() function gives the current date so...

Type in B2
=INT(NOW()-A1)
and make sure that B2 is formatted as a number, not a date.

The =INT function is not strictly necessary. It converts the date into an
integer so you don't have a decimal fraction of a day.

Copy this formula into B2 for your 2nd example.
If automatic recalculation is not turned on, press SHFT-F9
 
The =NOW() function gives the current date so...

Type in B2
=INT(NOW()-A1)
and make sure that B2 is formatted as a number, not a date.

The =INT function is not strictly necessary. It converts the date into an
integer so you don't have a decimal fraction of a day.

Copy this formula into B2 for your 2nd example.
If automatic recalculation is not turned on, press SHFT-F9

=today()-a1
format as general
or
=today()-a1+1
(if you want to include the end date)

For the other stuff, look at Chip Pearson's notes for =DateDif():
http://www.cpearson.com/excel/datedif.aspx

Thanks, guys. Both ways worked.
 
Back
Top