Previous Topic: Selection, Rejection, and Compares Involving Date Fields

Next Topic: Calculations Involving Date Fields


Grouping

When grouping on date fields, if the dates in the data span the millenium, it is necessary to modify the GROUP/GROUPC Control Statements. For the Group Control Statement, add another group definition referencing the original (Date) Group field. For the original GROUPC Control Statement, make the ending range the last day of the 20th century. Add a second GROUPC Control Statement for the beginning and ending date ranges to be selected in the 21st century. An example follows.

Before Year 2000 Support

ASORT    04306A2 03706A  01608A
AGROUP   0436                     -----> DATE FIELD
AGROUPC  1991201 991231  A        -----> 12/01/99 - 12/31/99

After Year 2000 Support

ASORT    04306A2 03706A  01608A
AGROUP   0436  0436               -----> DATE FIELDS
AGROUPC  1991201 991231  A        -----> 12/01/99 - 12/31/99
AGROUPC  2000101 000131  B        -----> 01/01/00 - 01/31/00