How do I calculate name of previous quarter?
I am using the Set Field script step to automatically set the date of one of two comparison dates. I can successfully set the current quarter [sjClientInfo::gQuarterTwo], but not the previous quarter [sjClientInfo::gQuarterTwo].
The following code sets the field to the last last quarter of the last calendar year which is OK if the current quarter is Q1, but not for Q2, 3 or 4. How do I change this please?
Set Field [sjClientInfo::gQuarterOne; Let ( T = Get ( CurrentDate ) ; If ( Ceiling ( Month ( T ) / 3 ) = 1 ; Year ( T ) -2 & " Q4" ; Year ( T ) - 1 & " Q4" ) )