Determining quarter number
Posted: Tue May 06, 2008 6:08 am
Is there an easy way to determine the number of quarters between two dates which could be added as a column derivation in say, a COPY stage:
For example:
NQTRS between (2007-03-31 - 2008-03-31) + 1 = 5 (absolute value)
Those of you familar with SAS, the code would be
NQTRS = INTCK('QTR','31Mar2007'd,'31Mar2008'd) + 1;
and would return 5
For example:
NQTRS between (2007-03-31 - 2008-03-31) + 1 = 5 (absolute value)
Those of you familar with SAS, the code would be
NQTRS = INTCK('QTR','31Mar2007'd,'31Mar2008'd) + 1;
and would return 5