Subject | Re: Number of months between dates |
---|---|
Author | Svein Erling |
Post date | 2004-05-12T13:46:07Z |
> it has some minor problems still ... for exampleSimple Raigo, simply correct your SP! You could either do:
>
> select * from SP_puhkus (
> '2.6.2004', '20.07.2004'
> )
>
> returns 1, but should be 2. if someone has ideas to improve it (of
> finds more bugs) please let me know.
IF ((AMonth<>LMonth) and (AYear<>LYear)) then
begin
If (ADay>=15) then worked_months=worked_months-1;
If (LDay>=15) then worked_months=worked_months+1;
end
or
months=LMonth-AMonth+1;
Set
***
NOTICE:
Only members of the Firebird Foundation gets to taste Bamsemums at
Fulda, so join today at http://www.firebirdsql.org/ff/foundation
***