Description |
Directives for Date Pictures (Magic xpi 3.x)
The tables below provide a list of positional directives for Date pictures.
|
|
|
DD
|
A placeholder for the number of the day in a month.
|
1-31
|
DDD
|
A placeholder for the number of the day in a year.
|
1-366
|
DDDD
|
A placeholder for the ordinal day number in a month.
|
Displayed as 1st, 2nd, etc.
|
MM
|
A placeholder for the number of the month in a year.
|
1-12
|
MMM
|
A placeholder for the abbreviated month of the year.
|
Jan, Feb, Mar, etc.
|
MMM...
|
A placeholder for the month displayed in full name form (up to 10 Ms in a sequence), such as January, February. If the month name is shorter than the number of Ms in the string, the rest of the M positions are filled with blanks.
|
N/A
|
YY
|
A placeholder for the number of the year.
|
0-99
|
YYYY
|
A placeholder for the number of the year, represented in full format, such as 2006.
|
N/A
|
W
|
A placeholder for the number of the day in a week, such as 1 for Sunday, 2 for Monday, and 7 for Saturday.
|
1-7
|
WWW
|
A placeholder for the abbreviated day of the week.
|
Sun, Mon, Tue, Wed, etc.
|
WWW...
|
A placeholder for the name of the day in a week. The string can be from 3 to 10 Ws. If the name of the day is shorter than the number of Ws in the string, the rest is filled with blanks.
|
N/A
|
/
|
A placeholder for the date separator position. The system will replace this character with the character defined in the Magic.ini file as the Date Separator.
|
N/A
|
##/##/##
|
A placeholder for the display date as DD/MM/YY or MM/DD/YY or YY/MM/DD according to the Date Mode environment setting.
|
|
|
|
|
Zc
|
Zero Fill
|
Instructs Magic xpi to fill the entire displayed variable (including the date separator) with the Character value if its value is zero. If you do not specify any character, the variable is padded with blanks.
Note that c represents a mask character. To use a directive character, for example X, where c appears, preface it with a backslash, as in \X.
Default: No character
|
T
|
Trim Text
|
Instructs Magic xpi to remove any blanks created by the positional directives WWW... (weekday name), MMM... (month name), or DDDD (ordinal day, e.g. 4th, 23rd). Since these positional directives must be specified in the picture string using the maximum length possible, unwanted blanks may be inadvertently created for names shorter than the specified length. The Trim Text directive will remove all such blanks.
If a space is required nevertheless, it must be explicitly inserted in the picture string as a mask character, using the ^ symbol to indicate a blank character, such as
TWWWWWWWWW^DDDD^MMMMMMMMM,YYYY
Default: No
|
|
Sample
|
Since Magic xpi defines the default picture mask for a Date variable as ## / ## / ##, the sample area initially shows MM/DD/YY, DD/MM/YY or YY/MM/DD according to the Date mode (American, European, or Scandinavian) set in the Environment settings.
If you have changed the default picture, this area shows the exact template of the property as it will be displayed; that is, which mask characters are displayed and how many positions the image will occupy on screen or report forms.
|
Examples of Date Pictures |
|
---|