The following table shows the symbols most commonly used in Date and Datetime ormat masks.
Symbol |
Description |
---|---|
9 |
Represents one numeric character. The number of 9's determines the number of digits the text item can display. |
MM |
Month (01-12). |
MON |
Name of month, 3-letter abbreviation. |
MONTH |
Name of month, padded with blank spaces to length of 9 characters. |
DD |
Day of month (1-31). |
DY |
Name of day, 3-letter abbreviation. |
DAY |
Name of day, padded with blanks to length of 9 characters. |
YYYY,YYY, YY, or Y |
4, 3, 2, or 1-digit year. |
TH |
Ordinal number (e.g., "DDTH" for "15TH"). |
SP |
Spelled out number (e.g.,, "DDSP" for "FIFTEEN"). |
SPTH or THSP |
Spelled out ordinal number (e.g.,, "DDSPTH" for "FIFTEENTH" |
FM |
Prefix used with symbols such as MONTH and DAY to suppress padding added by these symbols. Also suppresses leading zeroes for number symbols such as HH and MM. FM is a toggle. If FM appears twice in a Date format model,, blank padding and leading zeroes are suppressed for elements after the first FM,, and are re-enabled after the second. |
To embed a character string in a Date format mask, enclose it in quotes. Spaces and punctuation characters (/ . , : ' - ) can be embedded in a Date format mask without enclosing them in quotes.
For example:
Format Mask |
Displayed Value |
---|---|
"Today's Date is " fmDAY, fmMONTH DDTH |
Today's Date is Tuesday, March 16TH |
Example
The following table shows examples of format masks for DATE values:
Format Mask |
Result |
---|---|
MM/DD/YYYY |
03/15/1995 |
MONTH 15 YYYY |
MARCH 15 1995 |
fmMONTH 15 1995 |
MARCH 15 1995 |
Day, "the" DDTH "of" fmMonth |
Wednesday, the 15TH of March |
J |
2449792 |
About formatting display item values with format masks
Assigning a format mask to a display item
Display item format mask symbols for NUMBER values