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!

How to calculate Years of Service 1

Status
Not open for further replies.

loveyoursite

Technical User
Apr 14, 2005
100
US
CRV10 - I need a formula that will calculate years of service from the EMPLOYEE.DATE_HIRED to current date. The result needs to include fractions. For example, if someone has been with the company 1 year and 6 months, the result needs to show 1.5 for 1 and 1/2 years.

Right now, I have not set any grouping on the report. The final result I'm look for is:

Jane Doe 7.3 years
John Blue 1.5 years
Wilson Red 32 years
Green Grass 15 years

I would appreciate any assistance. Thanks!
 
Hi,
Have you tried :

(CurrentDate - {EMPLOYEE.DATE_HIRED}) /365.25



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Perfect! Thanks so much! I have one more question. Would you by any chance know a formula that would count how many employees have less than or equal to 5 years of service (10, 15, 20, 25 years?) I need to be able to report for example that we have 2,398 employees with 5 years or less of service and that number accounts for 56% of our workforce.
 
Hi,
For each employee detail, create several formulas that check the Length of Service formula you created and, depending on the result set a value to 1 or 0:

Like this
@Is5YrsofLess
If @Los < 5.99 then 1 else 0
@Is10 years
If @Los in 10.0 to 10.99 then 1 else 0
@Is15 years
If @Los in 15.0 to 15.99 then 1 else 0
etc..

Sum each formula in the report footer with an appropriate label..




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Excellent. Thank you so much! You've saved me a great deal of time.
 
Hi,
Depending on your needs,you may want to modify the tests to show those with 'at least' 10 or 15 or 20,etc. years of service..the one I posted will show those with exactly 10,15,20, etc..



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top