## Expressing Time as a number in Excel

## Expressing Time as a number in Excel

(OP)

I have a simple problem :

In Excel in cell A2 in want to write a date say Mar 2015.

In Cell B2 I want to write another date say Dec 2010.

In Cell C2 I want to write a formula that will give the difference ( A2 - B2)

ie the difference in time in Years ie a number like 4.2.

I want the date in Cells A2 and B2 in a format that is easily recognised by the reader like Mar 2015, Dec 2010.

Can you help please.

## RE: Expressing Time as a number in Excel

## RE: Expressing Time as a number in Excel

Doug Jenkins

Interactive Design Services

http://newtonexcelbach.wordpress.com/

## RE: Expressing Time as a number in Excel

http://www.excel-easy.com/examples/datedif.html

## RE: Expressing Time as a number in Excel

TTFN

FAQ731-376: Eng-Tips.com Forum Policies

Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers

Of course I can. I can do anything. I can do absolutely anything. I'm an expert!

There is a homework forum hosted by engineering.com: http://www.engineering.com/AskForum/aff/32.aspx

## RE: Expressing Time as a number in Excel

TTFN

FAQ731-376: Eng-Tips.com Forum Policies

Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers

Of course I can. I can do anything. I can do absolutely anything. I'm an expert!

There is a homework forum hosted by engineering.com: http://www.engineering.com/AskForum/aff/32.aspx

## RE: Expressing Time as a number in Excel

Simple and to the point. Much appreciated.

## RE: Expressing Time as a number in Excel

## RE: Expressing Time as a number in Excel

Doug Jenkins

Interactive Design Services

http://newtonexcelbach.wordpress.com/

## RE: Expressing Time as a number in Excel

=YEARFRAC(A2,B2)

## RE: Expressing Time as a number in Excel

Note that there is no option for 365.24 day years.

TTFN

FAQ731-376: Eng-Tips.com Forum Policies

Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers

Of course I can. I can do anything. I can do absolutely anything. I'm an expert!

There is a homework forum hosted by engineering.com: http://www.engineering.com/AskForum/aff/32.aspx

## RE: Expressing Time as a number in Excel

Or should that be 365.2425?

http://en.wikipedia.org/wiki/Leap_year

On the other hand, if the time period does not include an end of century (or if that end of century is divisible by 400), then 365.25 is more accurate.

But for the precision required by the OP, 365, or even 360 would do :)

I hadn't heard of (or had forgotten about) Yearfrac. It's one of those functions where typing in the function name requires more keystrokes than just doing the arithmetic. I think there should be a name for that.

Doug Jenkins

Interactive Design Services

http://newtonexcelbach.wordpress.com/

## RE: Expressing Time as a number in Excel

FAQ731-376: Eng-Tips.com Forum Policies

Of course I can. I can do anything. I can do absolutely anything. I'm an expert!

There is a homework forum hosted by engineering.com: http://www.engineering.com/AskForum/aff/32.aspx