how do I subtract 2 date fields to get number of days elapsed?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to calculate the difference between date fields to get the answer in
days

E.g. Open shop 10 Feb 2004
close shop 15 feb 2004
= 5 days

So what is the formula for this???
 
Hi

one option
assuming open date in A1, close date in B1
=B1-A1
or
=E14-D14 & " days"
(but be aware this second option changes the answer to a text field - if you
want the word "days" but still want it as a number field this can be
achieved with custom formatting.)

then choose format / cells - under the number tab choose Number and set
decimal places as required.

Cheers
JulieD
 
A1 = 10 Feb 2004
B1 = 15 Feb 2004

Format both cells/rows to the date format you need.
C1 = B1 - A1

Again, make sure you have the right format for time in days.
 
Assuming that the dates are not more than 360 days apart,
you can use following formula, assuming date1 is in cell A1 and date2 is
is cell B1

=DAYS360(A1,B1)
If you do not want the formula to return a negative number,
and always return a positive number use

=ABS(DAYS360(H63,H64))

Sharad
 

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

Back
Top