Subject | Re: [firebird-support] Number of months between dates |
---|---|
Author | Martijn Tonies |
Post date | 2004-05-12T12:28:14Z |
Hi,
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 regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
> >Or is the difference between 3 march and 20 Jan = 2 months?number of months person has been working for calculating how many holiday
>
> Almost. This I am doing for a Payroll+HR program and has to calculate
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.
>February, but January and March were less than 15 days).
> with that example 20 Jan - 3 March, number of months would be 1 (full
>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