Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date difference

Status
Not open for further replies.

mosmas

Technical User
May 22, 2003
61
US
I have user who wants to calculate the number of years and months someone has been employed. This is what I had in mind.

we would have a col with Hire Date, Today's and two more columns, one for years and one for months. TO find years, I used this formular: datedif(a2,b2,"Y") and it works just fine.

now I need to to calculate the months left. This is where I need your help. Can someone help. Thanks in advance.

Moses.
 
Hi there just use "m" in place of "y"
 
Neenas19:

Thanks I just figure out how. To calculate the months, I just need to subtract 12*the number of years from
=datedif(a2,b2,"m").

Thanks for your input though.

moses
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top