Converting date to numerical and doing calculations

  • Thread starter Thread starter Teddy
  • Start date Start date
T

Teddy

Does anyone know how to convert a date into a single number so that you
can do calcuations with it? For example, Nov,2005 minus January, 2004
equals 23.
 
Dates ARE stored as numbers, specifically the number of elapsed days since Dec
31, 1899. If you want the difference in months, you can use the undocumented
DATEDIF function: =DATEDIF(A1,B1,"m")
 
dates are actually stored as normal numbers

for instance

a2 has 23/01/2005
a1 has 12/11/2004
both formatted as dates

if you would copy paste and format the pasted cells as numbers you se

that 23/01/2005 is now 38375 and 12/11/2004 is 38303

in a3 enter =a2-a1
formatted as number
result 72

in a4 enter =a1-a2
formatted as number
result -72

if result is ############### then the cell is still formatted as a dat
and
you have a negative "date
 

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