5
Answers

sql function help

dragan perkovic

dragan perkovic

10y
830
1
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)