Subject Re: [firebird-support] Number of months between dates
Author Martijn Tonies
Hi,

> >Or is the difference between 3 march and 20 Jan = 2 months?
>
> Almost. This I am doing for a Payroll+HR program and has to calculate
number of months person has been working for calculating how many holiday
days to give him/her. If has worked more than 15 days in month it counts for
month (this is according to law here). Basically if in starting date day
number is <=15 and in ending date day >=15 they count in.
>
> with that example 20 Jan - 3 March, number of months would be 1 (full
February, but January and March were less than 15 days).
>

I suggest writing an UDF for that.

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com