Clive Richmond
19-Jul-2018, 03:36 AM
Date attributes default as follows:
SysDate4_State /
DF_SYSDATE_4_STATE
True
SysDate command returns dates with the year in 4 digits.
Date4_State /
DF_DATE_4_STATE
True
2-digit year dates will be saved to the disk with 4-digit years.
Epoch_Value /
DF_EPOCH_VALUE
30
2-digit years below 30 will be interpreted dates in the 2000s. 2-digit years above 30 will be interpreted as being in the 1900s
These are set in VDFBase.pkg and have been so since Visual DataFlex 12.0. However, if you create a very basic program the runtime values are identical except SysDate4_State. It returns false.
I am just wondering why that might still be the case and if it did return true then may be these settings could be cleaned-up?
Use ui
Procedure Test GLOBAL
Boolean b4DigitYrs bConvert2DigitYrs
Integer iEpochValue
Get_Attribute DF_SYSDATE_4_STATE To b4DigitYrs
Get_Attribute DF_DATE_4_STATE To bConvert2DigitYrs
Get_Attribute DF_EPOCH_VALUE To iEpochValue
End_Procedure
Send Test
SysDate4_State /
DF_SYSDATE_4_STATE
True
SysDate command returns dates with the year in 4 digits.
Date4_State /
DF_DATE_4_STATE
True
2-digit year dates will be saved to the disk with 4-digit years.
Epoch_Value /
DF_EPOCH_VALUE
30
2-digit years below 30 will be interpreted dates in the 2000s. 2-digit years above 30 will be interpreted as being in the 1900s
These are set in VDFBase.pkg and have been so since Visual DataFlex 12.0. However, if you create a very basic program the runtime values are identical except SysDate4_State. It returns false.
I am just wondering why that might still be the case and if it did return true then may be these settings could be cleaned-up?
Use ui
Procedure Test GLOBAL
Boolean b4DigitYrs bConvert2DigitYrs
Integer iEpochValue
Get_Attribute DF_SYSDATE_4_STATE To b4DigitYrs
Get_Attribute DF_DATE_4_STATE To bConvert2DigitYrs
Get_Attribute DF_EPOCH_VALUE To iEpochValue
End_Procedure
Send Test