The format specifier in the format string of the Format function takes the following format:

%[-][width][.prec]type

where % is the required format specifier identifier, followed by an optional minus sign to specify left justification, followed by an optional minimum field width, followed by an optional precision (number of decimal places) preceded by a decimal point, and finally the format type, which is required, to indicate the type of value being formatted. Valid types are:

d signed integer value formatted as -ddd
u unsigned integer value formatted as dd (no sign output)
e scientific notation formatted as –d.dddE+ddd
f floating point value formatted as –d.ddd
g floating point formatted as shortest of f or e formats with default precision of 15 decimal places
n floating point number formatted as -n,nnn,nnn.nn with comma and decimal separators
m floating-point number formatted as currency
p integer value formatted as 8-digit hexadecimal pointer
s string value formatted as fixed or variable length string
x integer value formatted as hexadecimal value