Calculating date as decimal?

T

Terry Pinnell

If I have variables D = day (1-31), M = month (1-12) and Y = year (4
digits), does anyone know what formula (containing only D, M and Y)
Excel uses to calculate its decimal equivalent for that date please?
 
T

Terry Pinnell

David Biddulph said:
=DATE(Y,M,D) and format as number or general.

Thanks David but I wasn't as clear as I should have been. I want the
FORMULA not the function. Something along the lines of

X = (Y-1900)*365 + 31*M + D ... etc etc
but obviously much more complicated due to leap years and varying
lengths of the final year's months etc.
 

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