APPX is the Premier Development and Runtime Environment for Business Application Software
(Answer) (Category) FAQ's - APPX Software, Inc. : (Category) APPX Utility : (Category) APPX Development Environment : (Category) Other Application Design Questions :
How does the pivot year logic work?
By defining a pivot year, you direct APPX to determine what century a particular year belongs to. For example, if the pivot year is set to 35, then any date field with a year greater than 35 will be assumed by APPX to have a century value of 19. Any date field with a year less than or equal to the pivot year will be assumed by APPX to have a century value of 20 (APPX System Admin Manual, Chapter 1).

In the following example:

SET ABC WORK CCYYMMDD 20------------ SET ABC WORK CCYYMMDD --98----------

ABC WORK CCYYMMDD would contain "19980101--------" after the second set statement was executed. Here's why:

Assuming the pivot year is 35 and the current year is 2004, after the first SET, ABC WORK CCYYMMDD contains "20040101--------". After the second, it contains "19980101--------". The pivot rule is applied. The month and day of 01 was set because the MMDD was null in the work field.

APPX date-synthesis rules will cause APPX to synthesize a century if a pivot date is specified and if a field containing only a YY is set into or compared with a field containing CCYY. As in the case above, "--98----------" is a date containing only a YY. APPX thus figures out a century for it, and when doing the SET into the CCYYMMDD field, the CCYY is set to 1998.

[Append to This Answer]
2003-Dec-31 9:21am
Previous: (Answer) Can I change the key of a file while in a BEG / END READ loop?
Next: (Answer) File-Level Event Point Modes
This document is:
[Search] [Appearance]
This is a Faq-O-Matic 2.719.
Copyright 2003 by APPX Software, Inc. All rights reserved.