Specifies how a date entered into the PROMPT field will be expanded, if only one or two digits are entered.
Symbol |
Description |
R |
= current – value is prefixed with the digits of the current century |
C |
= closest – value is expanded to the nearest date in a past, future, or current century |
F |
= future – value is expanded to the nearest date which is definitely in the future |
P |
= past – value is expanded to the nearest date which is definitely in the past |
If a variable of the FOR clause is of the DATE or DATETIME data type, ATTRIBUTE clause can include CENTURY attribute. Semantics of this attribute is the same as CENTURY attribute of a form field.
CENTURY attribute is used to define how a date entered into the PROMPT field will be expanded, if only one or two digits are entered for year value. It supports the settings of the DBCENTURY environment variable.
If you specify anything for this attribute other than the four letters listed in the table above, an error will occur.
If the settings of the DBCENTURY environment variable differ from the settings of the CENTURY attribute, the CENTURY attribute overrides the settings of the environment variable.
MAIN
DEFINE ord_date DATE
PROMPT "Enter the date of order" ATTRIBUTE (REVERSE, GREEN) FOR ord_date
ATTRIBUTE (BLUE, CENTURY = "P")
END MAIN
Related articles:
DBCENTURY