Skip to Content
0
Jan 15, 2008 at 04:24 PM

Calculating a Leap Year with a FOX Formula

56 Views

Hi to everybody.

Is it posible to calculate a leap year using BPS in BW 3.5 with a FOX formula?

The code i need to write is something like this:

if ((year % 4 == 0) AND ((year % 100 != 0) OR (year % 400 == 0)) then

it is a leap year;

else

it isn´t a leap year;

endif;

The problem i have is that my variable year is an standard type 0CALYEAR and I cannot do i.e.

Year MOD 4, and save this value to an integer because 0CALYEAR and INTEGER are different types of variables.

Any idea?

Thanks in advance!

Edited by: Ivan Lopez on Jan 15, 2008 5:24 PM

Edited by: Ivan Lopez on Jan 15, 2008 5:24 PM