dragan perkovic

dragan perkovic

  • NA
  • 3
  • 1.1k

sql function help

May 25 2014 4:18 PM
Hi,
I need help about writing function in SQL that will return me a period of how long employee is working in a firm, in format yy/mm/dd, based on date of when employee started to work in format yyyy/mm/dd. Let's say that one employee start at 1981/04/21, function should return me 33/01/01, this employee is working 33 years, one month and one day. I don't need to pay attention on leap years, i could take that every month have 30 days.
Thanks

Answers (5)