using datedif formula

M

marie

I am using a datedif formula to calculate an employee's number of years
worked. I have the hire date and current(sheet) date. I have used the
formula
=datedif(cellwithcurrentdate,cellwithhiredate,"y"). The return is
1/17/1900. What am I doing wrong?
 
R

Rick Rothstein

You aren't doing anything wrong... that is just Excel trying to be helpful
(it saw you working with dates, so it gave you its answer as a date)... just
Format the cell to General and it will report 17 as the result.
 
D

David Biddulph

I would have expected an error, as (assuming that hire date is in the past)
the syntax would be
=datedif(cellwithhiredate,cellwithcurrentdate,"y") not
not =datedif(cellwithcurrentdate,cellwithhiredate,"y")
 

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

Similar Threads

Excel DateDif - why does 2007 seem different? 3
Average of Years employed 4
Add/Sum up months, years, dates 4
Excel formula calculating age 4
Date formula 1
Totaling DATEDIF SUMS 4
DATEDIF vs. simple difference 5
DATEDIF 11

Top