Formatting

The following table describes the formatting options for each data type, including:


Data type

Description of data type /Formatting argument

Representation as a text string

Text

Text string

Text string

Alt Text

Possibly localized text string

Text string (Switch always uses the default language)

Text Indexed

List of items of type Text

See indexed variables

Boolean

Boolean value true or false

"True" or "False" (or all-lower-case versions)

Integer

Integer number

Decimal representation (including minus sign if needed; no plus sign; no leading zeroes)

Rational

Rational number formed by division of two integers

Decimal representation of the form: numerator, forward slash, denominator; example: "2/3" or "-17/4"

Precision="integer"

Decimal floating point representation with the specified number of digits after the decimal point (minimum precision is 1, max is 15)

Date

A moment in time, including date and/or time information

String representation in the subset of the ISO 8601 format allowed in XMP Date fields (see Adobe XMP specification, version dated September 2005, page 75)

Equivalent to format string "yyyy-MM-ddThh:mm:ss.zzz"

Format="format-string"

String representation in the format specified by the format string, which must conform to the syntax described below

Date format string

The following format expressions are recognized and replaced in the date format string:

Expression

Output

d

the day as number without a leading zero (1 to 31)

dd

the day as number with a leading zero (01 to 31)

ddd

the abbreviated day name (example: 'Mon' to 'Sun')

dddd

the long day name (example: 'Monday' to 'Sunday')

M

the month as number without a leading zero (1-12)

MM

the month as number with a leading zero (01-12)

MMM

the abbreviated month name (example: 'Jan' to 'Dec')

MMMM

the long month name (example: 'January' to 'December')

yy

the year as two digit number (00-99)

yyyy

the year as four digit number

h

the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)

hh

the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)

m

the minute without a leading zero (0 to 59)

mm

the minute with a leading zero (00 to 59)

s

the second without a leading zero (0 to 59)

ss

the second with a leading zero (00 to 59)

z

the milliseconds without leading zeroes (0 to 999)

zzz

the milliseconds with leading zeroes (000 to 999)

AP

use AM/PM display; AP will be replaced by either "AM" or "PM"

ap

use am/pm display; ap will be replaced by either "am" or "pm"

'...'

any sequence of characters enclosed in single quotes is treated as literal text

See also: