Calculating years of experience using YEAR( )
775110Jul 1 2010 — edited Jul 1 2010Hi all,
I am trying to calculate the years of experience for every employee in a company. Ideally, I hope the system will update the years of experiece every year without hardcoding.
For example, instead of:
Select 2010 - emp.start_year
from emp
I want to use:
Select YEAR(GETDATE()) - emp.start_year
from emp
However, apex gave me an error saying "YEAR" is not a valid identifier.
What's wrong and how do I fix that?
Thank you very much for the help!