|Re: BirtDuration.day [message #547370 is a reply to message #547290]
||Fri, 16 July 2010 13:38
| Richard A. Polunsky
Registered: July 2009
Location: Houston TX
There are some libraries out there which provide a "daysInMonth" function - that would simplify your life but I don't think we have it available to us.
I'll leave the specific syntax of some of the functions to you as I'm not in my environment.
Given as available fields [amount] and [date]
If [date].Month in [9,4,6,11] then [amount] / 30.0;
If [date].Month in [1, 3, 5, 7, 8, 10, 12] then [amount] / 31.0;
If [date].Month = 2 and [date].Year mod 4 = 0 then [amount] / 29.0;
If [date].Month = 2 and [date].Year mod 4 != 0 then [amount] / 28.0;
Powered by FUDForum
. Page generated in 0.03749 seconds