I am trying to find the work experience of employees in ORACLE SQL Developer.
I have the following columns in the table employees
: Hire_Date(DD-MM-YY)
, First_name
, Last_Name
, Employee_id
, Salary
, Manager_ID
and so on.
I guess I need to apply some conversion but I'm not sure about the method or how to convert it.
I tried to subtract hire_date from Sysdate.
Select, Employee_id, First_name, Hire_Date, (Sysdate-Hire_Date) as year_Exp
from employees;
I am getting the output as
Actual result: 5966.52.333333333333333333333333333333333
Expected result: 5 Years or relevant years of experience