Directives
DAY_FORMAT Specify DAY Format
 
Formats 1. Set Date Format Mask: DAY_FORMAT [new_fmt$]
 
2. Read Date Format Mask: DAY_FORMAT READ current_fmt$
 
Where:
 
new_fmt$ String expression containing the format for the variable DAY. Optional. Defaults to "MM/DD/YY".
 
current_fmt$ String expression (max 8kb) containing current DAY_FORMAT setting.
 
Description Use the DAY_FORMAT directive to change the format mask for the DAY variable. The format string contains the new format for the DAY variable. Characters in the format string control the following:
 
DD Insert current day
MM Insert current month
YY Insert current year (last two digits only)
YYYY Insert four digit year
AA Insert current year using 00-99 for 1900 through 1999, A0-A9 for 2000
through 2009, B0-B9 for 2010 through 2019, etc.
 
All other characters in the mask are returned as literals in the DAY variable. The
DAY_FORMAT stays in effect until a START directive is executed.
 
The DAY_FORMAT directive mask can contain the letters AA (e.g., "MM/DD/AA"). The format AA indicates a packed two-character year field. ProvideX returns $A0$ for the year 2000, $A1$ for 2001, $B0$ for 2010, etc. up to $Z9$ for the year 2269. This format assists with conversion issues in legacy applications.
 
See Also DAY System Variable,
DTE( ) Function,
JUL( ) Function.
 
Examples Example 1: Example 2:
0010 PRINT DAY 0010 LET X$="01/01/A0"
0020 DAY_FORMAT "YYYY MM/DD" 0020 DAY_FORMAT "MM/DD/AA"
0030 PRINT DAY 0030 PRINT JUL(X$)
->RUN 0040 PRINT DTE(10957:"%Y %Ml %D")
11/15/00 ->RUN
2000 11/15 10957
2000 January 1