7 Replies Latest reply: Jul 1, 2010 2:59 PM by 775110 RSS

    Calculating years of experience using YEAR( )

      Hi 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!