ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how long date difference (https://www.excelbanter.com/excel-discussion-misc-queries/95654-how-long-date-difference.html)

hellZg8

how long date difference
 
I'm looking for a way to find out how long an employee has been with the
company.

I enter the start date in one column and in the next column it has today's
date
then in the third column it has the difference between the two.

thanks in advance


Marcelo

how long date difference
 
Hi,

use DATEDIF(A2,A3,TYPE)

Type = "Y" - if you are looking for the difference in complete Yeards
"M" diference in complete months
"D" diference in days
"MD" diference between dates but months and years are ignorated
"YD" diference between dates but days and years are ignorated

Does this helps?
thanks in advance for your feedback
regards from Brazil
Marcelo


"hellZg8" escreveu:

I'm looking for a way to find out how long an employee has been with the
company.

I enter the start date in one column and in the next column it has today's
date
then in the third column it has the difference between the two.

thanks in advance


Marcelo

how long date difference
 
sorry I forgot that
assuming the initial date is in A2 and today is in A3
regards

"Marcelo" escreveu:

Hi,

use DATEDIF(A2,A3,TYPE)

Type = "Y" - if you are looking for the difference in complete Yeards
"M" diference in complete months
"D" diference in days
"MD" diference between dates but months and years are ignorated
"YD" diference between dates but days and years are ignorated

Does this helps?
thanks in advance for your feedback
regards from Brazil
Marcelo


"hellZg8" escreveu:

I'm looking for a way to find out how long an employee has been with the
company.

I enter the start date in one column and in the next column it has today's
date
then in the third column it has the difference between the two.

thanks in advance


Franz Verga

how long date difference
 
Nel post
*hellZg8* ha scritto:

I'm looking for a way to find out how long an employee has been with
the company.

I enter the start date in one column and in the next column it has
today's date
then in the third column it has the difference between the two.

thanks in advance


A2 = start date
B2 = TODAY()

C2=B2-A2

this way work fine if the dates are real dates, not inputed as text; if this
is the case, you can use:

C2=VALUE(B2)-VALUE(A2)

--
Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy



hellZg8

how long date difference
 
hello Marcelo and Ciao
thank you both for you quick response

both formulas return a value in c2

example

a1= Feburary 18,1988
b1=Now()
c2=19.4 years

cells a1 & b1 are both formated with date as shown in a1 example
(mmmm dd,yyyy)



hellZg8

how long date difference
 
sorry I should had said a Value error



David Biddulph

how long date difference
 
"hellZg8" wrote in message
...
sorry I should had said a Value error


Perhaps your misspelling of February?
And it may not recognise that format. Try something like 18/2/88.

=ISNUMBER(A1) will check that you've got a number that it can understand.
--
David Biddulph



hellZg8

how long date difference
 
I actually did spell check so feburary was actually spelled correctly

I tried the =datedif(a1,b1,Y) got #name? in cell c1
a1= startdate
b1 =now()
c1=how many years in a number format with one decimal
place representing the months

eg.. 19 years 4 months = 19.4

formatting of the cells a1 & b1 are date with mmmm dd,yyyy
and c1 is number


Peo Sjoblom

how long date difference
 
You need to put quotes around the Y

=DATEDIF(A1,B1,"Y")

btw, you can use this instead

=DATEDIF(A1,NOW(),"Y")

or

=DATEDIF(A1,TODAY(),"Y")

if A1 is not a date excel recognizes it will return a value error

--

Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
"It is a good thing to follow the first law of holes;
if you are in one stop digging." Lord Healey


"hellZg8" wrote in message
...
I actually did spell check so feburary was actually spelled correctly

I tried the =datedif(a1,b1,Y) got #name? in cell c1
a1= startdate
b1 =now()
c1=how many years in a number format with one decimal
place representing the months

eg.. 19 years 4 months = 19.4

formatting of the cells a1 & b1 are date with mmmm dd,yyyy
and c1 is number




hellZg8

how long date difference
 
hello Peo

thank you for your response on this matter,and this does work now by puting
the quotes around the "Y"

thanks again for all who replied to this post.


All times are GMT +1. The time now is 12:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com