About format pictures

Microsoft Office ShapeSheet

About format pictures

A format picture is used to determine how a value will be displayed. For example, you can control the number of digits displayed to the right or left of a decimal point, or whether a text string appears as uppercase or lowercase.

The following tables show symbols you can use to format different types of values for display.

Click to show or hide information.String and numeric values

Character

Description

#

Digit placeholder. Displays either a digit or nothing. Leading and trailing zeros are not displayed. If more digits than placeholders are to the left of the decimal, all digits are displayed. If more digits than placeholders are to the right of the decimal, the fraction is rounded to the number of placeholders. For a dimension, if the placeholder is the leftmost digit, subunits that are 0 are not displayed.

For example, FORMAT(0ft. 11.25in.,"#.##u") displays 11.25in.

0

Digit placeholder (zero). Displays either a digit or nothing. Leading and trailing zeros are displayed. If more digits than placeholders are to the left of the decimal, all digits are displayed. If more digits than placeholders are to the right of the decimal, the fraction is rounded to the number of placeholders. For a dimension, subunits that are 0 are displayed.

For example, FORMAT(2ft. 11.33in.,"0.## u") displays 2 ft. 11.33 in.

.

Decimal placeholder. Determines how many digits are displayed to the left and right of the decimal position. In a multipart unit, the decimal is used in the smallest (rightmost) subunit. Displays the decimal character defined for the system's Regional Settings.

For example, FORMAT(250 cm.,"0.000 u") displays 250.000 cm.

,

Thousands separator. If surrounded by digit placeholders (# or 0), the separator separates thousands from hundreds within a number that has four or more digits to the left of the decimal. Displays the thousands separator defined for the system's Regional Settings.

E- E+ e- e+

Scientific format. If the format contains at least one digit placeholder to the right of these symbols, the number is displayed in scientific format. Inserts the E or e between the number and its exponent. For E+ or e+, displays the plus (+) sign before positive exponents and the minus (-) sign before negative exponents. For E- or e-, displays the minus (-) sign only when the exponent is negative.

For example, FORMAT(12345.67,"###.#e+#") results in .123.5e+2.

u or U

Short label placeholder. Inserts abbreviated unit labels after each subunit. For example: in., ft., deg. The u placeholder inserts lowercase labels, and U inserts uppercase labels. Inserts the same number of spaces before the label as before the placeholder.

For example, FORMAT(12 ciceros 13 didots,"#u") displays 13c1.

uu or UU

Long label placeholder. Inserts unit labels after each subunit. For example: inches, feet, degrees. The u placeholder inserts lowercase labels, and U inserts uppercase labels. Inserts the same number of spaces before the label as before the placeholder.

For example, FORMAT(12.43in.,"# #/4 UU") displays 12 2/4 INCHES.

uuu or UUU

Universal label placeholder. Inserts the universal (internal to Microsoft Visio) form of unit labels after each subunit. The u placeholder inserts lowercase labels, and U inserts uppercase labels. Inserts the same number of spaces before the label as before the placeholder.

/

Fraction placeholder. Displays expression as a whole number with fraction if a leading digit placeholder is present. Otherwise, displays only the whole number in the numerator. If a number follows the digit placeholder in the denominator, rounds the fraction to the nearest fraction whose numerator is 1 and simplifies it. If a number is specified in the denominator without the digit placeholder, rounds to the nearest fraction but does not simplify it.

For example, FORMAT(12.43,"# #/4") displays 12 2/4.

space

Displays a space character in the formatted output. To display another character, use the backslash (\) character.

Click to show or hide information.Currency values

Character

Description

$

Currency symbol. Displays the currency symbol defined in the system's Regional Settings.

u or U

Short label placeholder. Inserts the standard symbol for local currency or the three-character currency abbreviations for nonlocal currencies. For example, $99.00, 42.70 FRF. The u placeholder inserts lowercase or mixed-case labels, and U inserts uppercase labels.

uu or UU

Long label placeholder. Inserts long currency labels after each subunit. For example: U.S. dollar, French franc. The u placeholder inserts lowercase or mixed-case labels, and U inserts uppercase labels.

uuu or UUU

Universal label placeholder. Inserts the universal, three-character currency abbreviations for all currencies after each subunit. For example, 99.00 USD, 42.70 FRF. The u placeholder inserts lowercase labels, and U inserts uppercase labels. Inserts the same number of spaces before the label as before the placeholder.

Click to show or hide information.Text values

Character

Description

\

Displays the next character as is. To display the backslash character, type \\. See also "text".

"text" or 'text'

Displays the text enclosed in quotation marks as is. See also \ (backslash).

@

Text placeholder. Replaces a string if the value of an expression is a string.

For example, FORMAT("Hello", "'You entered ('@')'" ) results in "You entered (Hello)".

@+

Uppercase text placeholder. For string values, substitutes the input with uppercase.

For example, FORMAT("Hello", "@ @+ @-" ) results in "Hello HELLO hello)".

@-

Text placeholder. For string values, substitutes the input with lowercase. For example, FORMAT("Hello", "@ @+ @-" ) results in "Hello HELLO hello)".

Click to show or hide information.Date values

Character

Description

c or C

Date or time placeholder. Displays date and time values using a short (c) or long (C) date format, and the general time format. Visio versions 4.0 and earlier ignore this placeholder.

For example: FORMAT(DATETIME("6/25/97 12:05"),"C") displays Wednesday, June 25, 1997 12:05:00 PM. FORMAT(DATETIME("Jun. 25, 1997"),"c") displays 6/25/97.

/

Date separator. If the expression is a date, separates the date components. Displays the date separator defined for the system's Regional Settings.

[ ]

Elapsed date placeholder. Used with the d, dd, w, and ww placeholders to display duration units.

For example, [d] or [dd] is elapsed days and [w] or [ww] is elapsed weeks.

d

Day placeholder. Displays the day as a number (1–31) without a leading zero.

dd

Day placeholder. Displays the day as a number (01–31) with a leading zero.

ddd or w

Short day of week placeholder. Displays the day as an abbreviation (Sun-Sat).

dddd or ww

Long day of week placeholder. Displays the day as a full name (Sunday–Saturday).

ddddd

Short date placeholder. Displays a date in the short form defined for the system's Regional Settings.

dddddd

Long date placeholder. Displays a date in the long form defined for the system's Regional Settings.

D

Day placeholder for Traditional Chinese. Displays the day of the month as the textual representation of the ordinal number. Locale-specific.

D_c

Day placeholder for Traditional Chinese. Displays the day of the month as the textual representation of the ordinal number. Independent of the system locale.

w_c or ww_c

Day placeholder for Traditional Chinese. Independent of the system locale.

w_e

Short day of week placeholder for English. Displays the day as an abbreviation (Sun–Sat). Independent of the system locale.

w_j

Short day of week placeholder for Japanese. Displays the day as an abbreviation. Independent of the system locale.

w_k

Short day of week placeholder for Korean. Displays the day as an abbreviation. Independent of the system locale.

w_s or ww_s

Day placeholder for Simplified Chinese. Independent of the system locale.

ww_e

Long day of week placeholder for English. Displays the day as a full name (Sunday–Saturday). Independent of the system locale.

ww_j

Long day of week placeholder for Japanese. Displays the day as a full name. Independent of the system locale.

ww_k

Long day of week placeholder for Korean. Displays the day as a full name. Independent of the system locale.

M

Month placeholder. Displays the month as a number (1–12) without a leading zero. See also m (minute placeholder).

MM

Month placeholder. Displays the month as a number (01–12) with a leading zero. See also mm (minute placeholder).

MMM

Month placeholder. Displays the month in abbreviated form (Jan–Dec).

MMMM

Month placeholder. Displays the full name of the month (January–December).

MMMM_c

Month placeholder for Traditional Chinese. Displays the full name of the month. Independent of the system locale.

MMMM_e

Month placeholder for English. Displays the full name of the month. Independent of the system locale.

yy

Year placeholder. Displays the year as a two-digit number (00–99).

yyyy

Year placeholder. Displays the year as a four-digit number (1900–2078).

g

Year placeholder. Locale-specific. For Japanese, displays short version for Gengo era. For Korean, displays Korean year label followed by a space.

g_j

Year placeholder. For Japanese, displays short version for Gengo era. Independent of system locale.

gg or G

Year placeholder. Locale-specific. For Traditional Chinese, displays short version for formal year label. For Japanese, displays short version for Gengo era in Kanji. For Korean, displays Korean year label followed by a space.

gg_c

Year placeholder. For Traditional Chinese, displays short version for formal year label. Independent of system locale.

gg_j

Year placeholder. For Japanese, displays short version for Gengo era in Kanji. Independent of system locale.

gg_k

Year placeholder. For Korean, displays Korean year label followed by a space. Independent of system locale.

ggg or GG

Year placeholder. Locale-specific. For Traditional Chinese, displays full version for formal year label. For Japanese, displays full version for Gengo era in Kanji. For Korean, displays Korean year label followed by a space.

ggg_c

Year placeholder. For Traditional Chinese, displays full version for formal year label. Independent of system locale.

ggg_j

Year placeholder. For Japanese, displays full version for Gengo era in Kanji. Independent of system locale.

e

Year placeholder. Locale-specific. For Traditional Chinese, displays string representing the Julian year. For Japanese, displays Gengo year as one or two digits and no leading zero. For Korean, displays the Korean year as a four-digit Arabic numeral.

e_c

Year placeholder. For Traditional Chinese, displays string representing the Julian year. Independent of system locale.

e_j

Year placeholder. For Japanese, displays Gengo year as a one- or two-digit Arabic numeral. Independent of system locale.

e_k

Year placeholder. For Korean, displays the Korean year as a four-digit Arabic numeral. Independent of system locale.

E

Year placeholder. Locale-specific. For Traditional Chinese, displays a string representing the republic year. For Japanese, displays Gengo year as one or two digits and no leading zero. For Korean, displays the Korean year as a four-digit Arabic numeral.

E_c

Year placeholder. For Traditional Chinese, displays a string representing the republic year. Independent of system locale.

ee

Year placeholder. Locale-specific. For Traditional Chinese, displays string representing the Julian year. For Japanese, displays Gengo year as a two-digit Arabic numeral with leading zero if needed. For Korean, displays the Korean year as a four-digit Arabic numeral.

ee_j

Year placeholder. For Japanese, displays Gengo year as a two-digit Arabic numeral. Independent of system locale.

EE

Year placeholder. Locale-specific. For Traditional Chinese, displays a string representing the republic year. For Japanese, displays Gengo year as a two-digit Arabic numeral with leading zero if needed. For Korean, displays the Korean year as a four-digit Arabic numeral.

n or N

Year placeholder. Locale-specific. For Traditional Chinese, displays the republic year as an Arabic numeral. For Japanese, displays Gengo year as one or two digits and no leading zero. For Korean, displays the Korean year as a four-digit Arabic numeral.

n_c

Year placeholder. For Traditional Chinese, displays the republic year as an Arabic numeral. Independent of system locale.

nn or NN

Year placeholder. Locale-specific. For Traditional Chinese, displays the republic year as an Arabic numeral. For Japanese, displays Gengo year as a two-digit Arabic numeral with leading zero if needed. For Korean, displays the Korean year as a four-digit Arabic numeral.

Click to show or hide information.Time values

Character

Description

:

Time separator. Displays the time defined for the system's Regional Settings.

[ ]

Elapsed time placeholder. Used with the h, hh, m, mm, s, and ss placeholders to display duration units. For example, [h] or [hh] is elapsed hours, [m] or [mm] is elapsed minutes, and [s] or [ss] is elapsed seconds.

h

Hour placeholder. Displays the hour without a leading zero in 12-hour form (0-12).

hh

Hour placeholder. Displays the hour with a leading zero in 12-hour form (00-12).

H

Hour placeholder. Displays the hour without a leading zero in 24-hour form (0-24).

HH

Hour placeholder. Displays the hour with a leading zero in 24-hour form (00-24).

m

Minute placeholder. Displays the minutes without a leading zero (0–59).

mm

Minute placeholder. Displays the minutes with a leading zero (00–59).

s

Second placeholder. Displays the seconds without a leading zero (0–59).

ss

Second placeholder. Displays the seconds with a leading zero (00–59).

t

AM/PM abbreviation. Displays the abbreviation defined for the system's Regional Settings.

tt

AM/PM designator. Displays the full designator defined for the system's Regional Settings.

t_c or tt_c

Traditional Chinese AM/PM designator. Displays the designator. Independent of system locale.

t_k or tt_k

Korean AM/PM designator. Displays the designator. Independent of system locale.

t_j or tt_j

Japanese AM/PM designator. Displays the designator. Independent of system locale.

t_e

English AM/PM designator. Displays the short designator. Independent of system locale.

tt_e

English AM/PM designator. Displays the full designator. Independent of system locale.

t_s or tt_s

Simplified Chinese AM/PM designator. Displays the designator. Independent of system locale.

T

General time format.