As you work with edit masks, keep in mind the following:
When using text, date, and numeric scientific edit masks with PRINT, the specified width value of PRINT sets the length allocated for the data displayed. For all other numeric edit masks, the edit mask sets the allocated length.
All masks can be used by the strtodate function except for CC, SCC, Q, W, and WW.
A backslash forces the next character into the output from the mask. For example, a mask of “The cu\rre\nt \mo\nth is Month” results in the output string of “The current month is January”. Without the backslashes the output string would be “The cu95e7t january is January”.
You can use a vertical bar as a delimiter between format codes; however, in most cases the bar is not necessary. For example, the mask 'YYYY|MM|DD' is the same as 'YYYYMMDD'.
Any other character (for example, punctuation) in a date edit mask is treated as a constant and is included in the edited field. If the edit mask contains spaces, you must enclose it in single quotes (').
The masks MON, MONTH, DAY, DY, AM, PM, BC, AD, and RM are case-sensitive and follow the case of the mask entered. For example, if the month is January, the mask Mon yields “Jan” and MON yields “JAN”. All other masks are case-insensitive and can be entered in either uppercase or lowercase.
National Language Support is provided for the following masks: MON, MONTH, DAY, DY, AM, PM, BC, and AD. See ALTER-LOCALE or in Production Reporting Samples for additional information.
If the value of the date field being edited is “Mar 14 1996 9:35”, the edit masks produce the results in Table 59.
In addition to the EDIT argument, you can use edit masks with MOVE, CONCAT, DISPLAY, and SHOW, and with the edit function of LET. Edit the field using the supplied mask before storing or displaying it.
When a date with missing date and/or time components displays or prints, the defaults are as follows:
let $date1 = strtodate('13:21','HH:MI')
When a date stored in a string literal, column, or variable prints with an edit mask, it must be in one of the following formats:
The format specified by SQR_DB_DATE_FORMAT, or the corresponding setting in SQR.INI.
One of the database-dependent formats in Table 61, Default Formats by Database.
The database-independent format, 'SYYYYMMDD[HH24[MI[SS[NNNNNN]]]]'.
When a date column or variable prints without an edit mask, the date prints in the format specified by SQR_DB_DATE_FORMAT or the corresponding setting in SQR.INI. If this is not set, the date prints in the primary database format (the first entry) in Table 61.