The format command is similar to the C printf function. It formats a string according to a format specification:
format spec value1 value2 ...
The spec argument includes literals and keywords. The literals are placed in the result as is, while each keyword indicates how to format the corresponding argument. The keywords are introduced with a percent sign, %, followed by zero or more modifiers, and terminate with a conversion specifier. Example keywords include %f for floating point, %d for integer, and %s for string format. Use %% to obtain a single percent character. The most general keyword specification for each argument contains up to six parts:
conversion character ...