Formats

These are the codes used in the Format function with examples.

This is a work in progress.

String & Numeric values

CharDescriptionExample 
 #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.
FORMAT(0ft 11.25in,”#.#0u”)11.25in.
 ,Thousand’s 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 Region and Language settings (Control Panel).
  
 .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 Region and Language settings (Control Panel).
FORMAT(250 cm,”0.000 u”)250.000 cm.
 /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.
FORMAT(12.43,”# #/4″)12 2/4.
 /uFraction placeholderFORMAT( 0 ft. 11.53 in. , “# #/# u”)11 5/9 in.
 0Digit 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.
FORMAT(2ft 11.33in,”0.## u”)2 ft. 11.33 in.
ConcatenateIf in ft and inches shows ’ or “ThePage!PageScale&””2′
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.FORMAT(12345.67,”###.#e+#”)123.5e+2.
 Nothing ThePage!PageScale2
SpaceDisplays a space character in the formatted output. To display another character, use the backslash () character.  
uShort label placeholder. Inserts abbreviated unit labels after each subunit. For example: in., ft., deg. The U placeholder inserts mixed-case labels, while the u placeholder inserts lowercase labels. Inserts the same number of spaces before the label as before the placeholder.FORMAT(12 c 13 d,”#u”)
FORMAT( 260.632 cm, “0.## u”)
FORMAT( 0ft. 11.53in., “0.000 u”)
FORMAT(ThePage!PageScale,”# #/# u”)
13c1.
260.63 cm.
0 ft. 11.530 in.
2 ft.
UShort label placeholder. Inserts abbreviated unit labels after each subunit. For example: in., ft., deg. The U placeholder inserts mixed-case labels, while the u placeholder inserts lowercase labels. Inserts the same number of spaces before the label as before the placeholder.=FORMAT( 0ft. 11.53in., “0.## U”)
FORMAT(ThePage!PageScale,”# #/# U”)
0 FT. 11.53 IN.
2 FT.
uuLong label placeholder. Inserts unit labels after each subunit. For example: inches, feet, degrees The uu placeholder inserts lowercase labels. Inserts the same number of spaces before the label as before the placeholder.FORMAT(ThePage!PageScale,”# #/# uu”)
FORMAT( 260.632 cm, “0 #/# uu”)
2 feet
260 5/8 centimeters
UULong label placeholder. Inserts unit labels after each subunit. For example: inches, feet, degrees The UU placeholder inserts mixed-case labels. Inserts the same number of spaces before the label as before the placeholder.FORMAT(ThePage!PageScale,”# #/# UU”)2 FEET
UULong label placeholder. Inserts unit labels after each subunit. For example: inches, feet, degrees The U placeholder inserts mixed-case labels, while the u placeholder inserts lowercase labels. Inserts the same number of spaces before the label as before the placeholder.FORMAT(12.43in,”# #/4 UU”)12 2/4 INCHES.
uuuUniversal label placeholder. Inserts the universal (internal to Visio) form of unit labels after each subunit. The u placeholder inserts lowercase labels. Inserts the same number of spaces before the label as before the placeholder.FORMAT(ThePage!PageScale,”# #/# uuu”)2 ft
UUUUniversal label placeholder. Inserts the universal (internal to Visio) form of unit labels after each subunit. The U placeholder inserts mixed-case labels. Inserts the same number of spaces before the label as before the placeholder.FORMAT(ThePage!PageScale,”# #/# UUU”)2 FT

Currency values

CharDescriptionExample 
 $Currency symbol.
Displays the currency symbol defined for the system’s Region and Language settings (Control Panel)
=Format = “$###,###.00”  “$1,200.00” .  
uShort label placeholder. Inserts the standard symbol for local currency or the three-character currency abbreviations for nonlocal currencies.
lowercase.
For example, $99.00, 42.70 FRF. 
uuLong label placeholder. Inserts long currency labels after each subunit.
lowercase.
For example: U.S. dollar, French franc. 
uuuUniversal label placeholder. Inserts the universal, three-character currency abbreviations for all currencies after each subunit.
lowercase, Inserts the same number of spaces before the label as before the placeholder.
For example, 99.00 USD, 42.70 FRF. 
UShort label placeholder. Inserts the standard symbol for local currency or the three-character currency abbreviations for nonlocal currencies.
mixed-case labels.
For example, $99.00, 42.70 FRF. 
UULong label placeholder. Inserts long currency labels after each subunit.
mixed-case labels.
For example: U.S. dollar, French franc. 
UUUUniversal label placeholder. Inserts the universal, three-character currency abbreviations for all currencies after each subunit. mixed-case labels. Inserts the same number of spaces before the label as before the placeholder.For example, 99.00 USD, 42.70 FRF. 

Text values

 CharDescriptionExample 
1“text” or
‘text’
Displays the text enclosed in quotation marks as is.  
2\Displays the next character as is. To display the backslash character, type \.  
3@Text placeholder. Replaces a string if the value of an expression is a string.FORMAT(“Hello”, “‘You entered (‘@’)'” )“You entered (Hello)”.
4@+Uppercase text placeholder. For string values, substitutes the input with uppercase.FORMAT(“Hello”, “@ @+ @-” )“Hello HELLO hello)”
5@-Text placeholder. For string values, substitutes the input with lowercase.FORMAT(“Hello”, “@ @+ @-” )“Hello HELLO hello)”.

Date values

CharDescriptionExample 
[ ]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. 
/Date separator. If the expression is a date, separates the date components.
Displays the date separator defined for the system’s Region and Language settings (Control Panel).
  
c or CDate 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.
FORMAT(DATETIME(“6/25/07 12:05″),”C”)
FORMAT(DATETIME(“Jun. 25, 2007″),”c”)
Monday, June 25, 2007
12:05:00 PM.  6/25/2007
DDay placeholder.
Displays the day as a number (1-31) without a leading zero.
=FORMAT(DATE(1999,6,7),”d”)7
DdDay placeholder.
Displays the day as a number (01-31) with a leading zero.
=FORMAT(DATE(1999,6,7),”dd”)07
ddd or wShort day of week placeholder.
Displays the day as an abbreviation (Sun-Sat).
=FORMAT(DATE(1999,6,7),”ddd”)Mon
ddddLong date placeholder.
Displays a date in the long form defined for the system’s Region and Language settings (Control Panel).
=FORMAT(DATE(1999,6,7),”dddd”)Monday
dddd or wLong day of week placeholder.
Displays the day as a full name (Sunday-Saturday).
=FORMAT(DATE(1999,6,7),”dddd”)Monday
dddddShort date placeholder.
Displays a date in the short form defined for the system’s Region and Language settings (Control Panel).
=FORMAT(DATE(1999,6,7),”ddddd”)6/7/1999
MMonth placeholder.
Displays the month as a number (1-12) without a leading zero. See also m (minute placeholder).
=FORMAT(DATE(1999,6,7),”M”)6
MMMonth placeholder.
Displays the month as a number (01-12) with a leading zero. See also mm (minute placeholder).
=FORMAT(DATE(1999,6,7),”MM”)06
MMMMonth placeholder.
Displays the month in abbreviated form (Jan-Dec).
=FORMAT(DATE(1999,6,7),”MMM”)Jun
MMMMMonth placeholder.
Displays the full name of the month (January-December).
=FORMAT(DATE(1999,6,7),”MMMM”)  June
YyYear placeholder.
Displays the year as a two-digit number (00-99).
  
YyyyYear placeholder.
Displays the year as a four-digit number (1900-2078).
  
MMMM_cMonth placeholder for Traditional Chinese.
Displays the full name of the month.
Independent of the user locale.
  
DDay placeholder for Traditional Chinese.
Displays the day of the month as the textual representation of the ordinal number. Locale-specific.
  
D_cDay placeholder for Traditional Chinese.
Displays the day of the month as the textual representation of the ordinal number.
Independent of the user locale.
  
E_cYear placeholder. For Traditional Chinese, displays a string representing the republic year.
Independent of user locale.
  
EEYear 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.
  
ee_jYear placeholder. For Japanese, displays Gengo year as a two-digit Arabic numeral.
Independent of user locale.
  
EYear 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.
  
EYear 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_cYear placeholder. For Traditional Chinese,
Displays string representing the Julian year.
Independent of user locale.
  
EeYear 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.
=FORMAT(DATETIME(1999,6,7),”E”)1999
e_jYear placeholder. For Japanese, displays Gengo year as a one- or two-digit Arabic numeral.
Independent of user locale.
  
e_kYear placeholder. For Korean, displays the Korean year as a four-digit Arabic numeral.
Independent of user locale.
  
GYear placeholder. Locale-specific. For Japanese, displays short version for Gengo era.
For Korean, displays Korean year label followed by a space.
  
gg or GYear 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_cYear placeholder. For Traditional Chinese, displays short version for formal year label.
Independent of user locale.
  
gg_jYear placeholder. For Japanese, displays short version
for Gengo era in Kanji.
Independent of user locale.
  
gg_kYear placeholder. For Korean, displays Korean year label followed by a space.
Independent of user locale.
  
ggg_cYear placeholder. For Traditional Chinese, displays full version for formal year label.
Independent of user locale.
  
ggg_jYear placeholder. For Japanese, displays full version
for Gengo era in Kanji.
Independent of user locale.
  
ggg or GGYear 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.
  
g_jYear placeholder. For Japanese, displays short version for Gengo era.
Independent of user locale.
  
MMMM_eMonth placeholder for English. Displays the full name of the month.
Independent of the user locale.
  
nn or NNYear 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.
  
n or NYear 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_cYear placeholder. For Traditional Chinese, displays the republic year as an Arabic numeral.
Independent of user locale.
Format(Now(), “d-mmm-yyyy hh:nn:ss”)29-088-2021 08:2021:36
ww_eLong day of week placeholder for English. Displays the day as a full name (Sunday-Saturday).
Independent of the user locale.
=FORMAT(DATE(1999,6,7),”ww”)Monday
ww_jLong day of week placeholder for Japanese.
Displays the day as a full name.
Independent of the user locale.
  
w_c or w_cDay placeholder for Traditional Chinese.
Independent of the user locale.
  
w_eShort day of week placeholder for English. Displays the day as an abbreviation (Sun-Sat).
Independent of the user locale.
=FORMAT(DATE(1999,6,7),”w”)Mon
w_jShort day of week placeholder for Japanese.
Displays the day as an abbreviation.
Independent of the user locale.
  
w_kShort day of week placeholder for Korean. Displays the day as an abbreviation.
Independent of the user locale.
  
w_kLong day of week placeholder for Korean. Displays the day as a full name.
Independent of the user locale.
  
w_s or w_sDay placeholder for Simplified Chinese.
Independent of the user locale.
  

Time values

CharDescriptionExample 
:Time separator. Displays the time defined for the system’s Region and Language settings (Control Panel).  
[ ]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. 
HHour placeholder. Displays the hour without a leading zero in 24-hour form (0-24).  
HHour placeholder. Displays the hour without a leading zero in 12-hour form (0-12).=FORMAT(TIME(15,30,30),”H”)15
HhHour placeholder. Displays the hour with a leading zero in 12-hour form (00-12).  
HHHour placeholder. Displays the hour with a leading zero in 24-hour form (00-24).  
MMinute placeholder. Displays the minutes without a leading zero (0-59).=FORMAT(TIME(15,7,8),”m”)7
MmMinute placeholder. Displays the minutes with a leading zero (00-59).=FORMAT(TIME(15,7,8),”mm”)07
TAM/PM abbreviation. Displays the abbreviation defined for the system’s Region and Language settings (Control Panel).=FORMAT(TIME(15,7,8),”T”)3:07:08 PM
TGeneral time format.  
TtAM/PM designator. Displays the full designator defined for the system’s Region and Language settings (Control Panel).  
t_c or tt_cTraditional Chinese AM/PM designator. Displays the designator.
Independent of user locale.
  
t_eEnglish AM/PM designator. Displays the short designator.
Independent of user locale.
  
tt_eEnglish AM/PM designator. Displays the full designator.
Independent of user locale.
  
t_j or tt_jJapanese AM/PM designator. Displays the designator.
Independent of user locale.
  
t_k or tt_kKorean AM/PM designator.
Displays the designator.
Independent of user locale.
  
SSecond placeholder.
Displays the seconds without a leading zero (0-59).
=FORMAT(TIME(15,7,8),”s”)8
SsSecond placeholder.
Displays the seconds with a leading zero (00-59).
=FORMAT(TIME(15,7,8),”ss”)08
t_s or tt_sSimplified Chinese AM/PM designator.
Displays the designator.
Independent of user locale.