Set_Date_Attribute
Obsolete
This command is obsolete. Use Set_Attribute and DF_DATE_FORMAT instead.
For example:
Set_Attribute DF_SYSDATE_4_STATE to True
Set_Attribute DF_DATE_4_STATE to True
Set_Attribute DF_EPOCH_VALUE to 30
See Also: Get_Date_Attribute, SysDate
Purpose
To control the behavior of the date system with regard to the century change at the Year 2000 (Y2K).
Syntax
set_date_attribute
attribute
to
value
Argument Explanation
attribute:
- SysDate4_State: Controls whether the sysdate command returns dates with the year in 2 or 4 digits.
- Date4_State: Controls whether entries of dates with two-digit years are converted to and from dates with four-digit years on saving to and retrieving from disk respectively.
- Epoch_Value: Sets the two-digit year value below which dates are considered to be in the 2000s. All other dates are considered to be in the 1900s.
value:
- True or False for SysDate4_State and Date4_State.
- 0 through 99 for Epoch_Value.
What It Does
set_date_attribute manages the running program's behavior in the entry of dates with two-digit years with regard to the change of century at the Year 2000. With it, you can have your existing applications continue to accept entries of dates with two-digit years while maintaining the internal date values with full four-digit-year precision to support finding, sorting, and other such functions.
Example:
set_date_attribute SysDate4_State to True
In this example, sysdate commands in the program will return dates with four-digit years instead of two-digit years.
set_date_attribute Date4_State to True
In this example, all entries of two-digit-year dates will be saved to the disk with four-digit years.
set_date_attribute Epoch_Value to 30
In this example, date entries with two-digit years below 30 will be interpreted internally as dates in the Twenty-first Century. Date entries with two-digit years above 30 will be interpreted as being in the Twentieth Century.
Notes
- Settings of Epoch_Value have no effect if Date4_State has not been set to True.
- A
set_date_attribute Date4_Statestatement overrides the value of the UseEpoch registry key, and aset_date_attribute Epoch_Valuestatement overrides the value of the Epoch registry key, but does not change the values of the keys. This command affects only the program that contains it, unlike the registry keys.