XFA Specification
Chapter 23, FormCalc Specification
String Built-in Functions
876
Format()
This function formats the given data according to the given picture clause.
Syntax
Format(s1, s2[, s3...])
Parameters
s1
is the picture clause, which may be a locale-sensitive picture clause.
See “Picture Clause
Specification” on page 901..
s2
is the source data being formatted.
s3, ...
is any additional source data being formatted.
For date picture clauses, the source data must be an ISO date string in one of two formats:
YYYY[MM[DD]]
YYYY[-MM[-DD]]
or, be an ISO date-time string.
For time picture clauses, the source data must be an ISO time string in one of the following formats:
HH[MM[SS[.FFF][z]]]
HH[MM[SS[.FFF][+HH[MM]]]]
HH[MM[SS[.FFF][-HH[MM]]]]
HH[:MM[:SS[.FFF][z]]]
HH[:MM[:SS[.FFF][-HH[:MM]]]]
HH[:MM[:SS[.FFF][+HH[:MM]]]]
or, be an ISO date-time string.
For date-time picture clauses, the source data must be an ISO date-time string.
For numeric picture clauses, the source data must be numeric.
For text picture clauses, the source data must be textual.
For compound picture clauses, the number of source data arguments must match the number of sub
elements in the picture.
Returns
The formatted data as a string, or an empty string if unable to format the data.
Examples
Format("MMM D, YYYY", "20020901")
returns Sep 1, 2002.
Home Index Bookmark Pages
Pages: Home Index All Pages