>>>Hi all,
>>>
>>>I've been doing some maintenance for our FPD app and needed an equivalent QUARTER() function. I was hoping that someone can share their user-defined function if they have one.
>>>
>>>Thanks in advance.
>>
>>Using the normal calendar rather than a fiscal one.
FUNCTION Quarter
>>
>>PARAMETER tdDate
>>
>>PRIVATE m.result
>>m.result = CEILING(MONTH(tdDate) / 4)
>>IF MONTH(tdDate) % 4 = 0
>> m.result = m.result + 1
>>ENDIF
>>RETURN m.result
>
>
>Wouldn't:
>RETURN FLOOR(MONTH(tdDate)/4)+1
>
>work better?
Naw, but MESSAGE#
885576 shows my original post was incorrect (bad testing on my part) and that
RETURN CEILING(MONTH(tdDate) / 3)
is correct.
George
Ubi caritas et amor, deus ibi est