How to display "Experience of employee"?e.g. 3 years 4 months 19 days

Showing Answers 1 - 3 of 3 Answers

jamesravid

  • Dec 10th, 2006
 

Try this query

select trunc(sysdate) today, hiredate, to_char(trunc(months_between(sysdate,hiredate)/12)) || ' years ' || to_char(mod(trunc(months_between(sysdate,hiredate)),12)) || ' months ' || to_char(trunc(sysdate) -add_months(hiredate,trunc(months_between(sysdate,hiredate)))) || ' days' "Experience" from emp;

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions