I am creating a report to demonstrate the period of dismissal of employees, so I need to calculate the days, months and years that it has been removed, and I am having a problem, in Firebird I use something like datediff(day,dtini,dtfim)
, the problem is that if passed a period as 02/02/2014 and 02/02/2014 says that there were 0 days of removal, one problem is that datediff
returns me one day less.
Another problem is that I do not know a function in Firebird that returns periods in days, months and years, already considering the number of days of each month, leaving a margin of error in the calculation since I'm doing this calculation in an approximate way.