DF_FILE_EPOCH_YEAR¶

Applies to: ORAFlex SQLFlex MYSQLFlex PGFlex DB2Flex

When dealing with two-digit years, an epoch year must be used to determine which century the date is referring to. For example if the epoch year is set to 30, then any two digit year greater than 30 will be considered in the 20th Century, anything less than or equal to 30 will be considered in the 21st Century. This attribute is used to turn on or off this feature. To use this feature, set this attribute to whatever the epoch year is expected to be. To disable this feature, set this attribute to 0 or false. Note that setting this attribute must be done at table creation or inside of a Structure_Start.

Syntax

Set_Attribute DF_FILE_EPOCH_YEAR of {FileNumber} to {variable}
Get_Attribute DF_FILE_EPOCH_YEAR of {FileNumber} to {variable}

Parameter

Description

FileNumber

Number of the file

variable

Indicates what the epoch year is. 0 to disable

Example

open Customer

Handle hFile
Boolean bEpoch

Move Customer.File_Number to hFile

Structure_Start hFile "ORA_DRV"
    Set_Attribute DF_FILE_EPOCH_YEAR of hFile to 30
    Get_Attribute DF_FILE_EPOCH_YEAR of hFile to bEpoch
Structure_End hFile DF_STRUCTEND_OPT_NONE "." 0