format

Core function New in package 162

Syntax

format( str, arg1[, arg2, .., argn] )

Parameters

Parameter Description
str Format string
arg1, arg2, .., argn One or more format string arguments

Description

Formats string using Python 3k format pattern (see also here).

Examples

Basic replacement

Padding

XDate support

Format specifier Description
d Day of the month as a decimal number [01, 31].
m Month as a decimal number [01, 12].
Y Year with century as a decimal number.
x Locale’s appropriate date representation.

XTime support

Format specifier Description
H Hour (24-hour clock) as a decimal number [00, 23].
I Hour (12-hour clock) as a decimal number [01, 12].
M Minute as a decimal number [00, 59].
p Locale’s equivalent of either AM or PM.
S Second as a decimal number [00, 59].
X Locale’s appropriate time representation.

See Also

XDate, XTime

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.