Formatting Date, Time, DateTime, Currency, and Number Elements
Use the following syntax to format Date, Time, DateTime, Currency, or Number elements. Variables that are user-supplied are set in italics.
Note:
This processing step occurs only if the output of the Transformation step is XHTML-compliant.
See XHTML™ 1.0 The Extensible HyperText Markup Language (Second Edition).
| Item to Insert | XHTML Tag | HTML After Processing |
|---|---|---|
|
Date |
<PSFORMAT TYPE="DATE" >DateToFormat</PSFORMAT> Note: FORMAT has the same syntax as the DateTimeToLocalizedString() PeopleCode Function. |
Formatted Date. Language-specific Formatted Date. |
|
Time |
<PSFORMAT TYPE="TIME" [SOURCETZ="Source Time Zone"][DESTTZ="Destination Time Zone"] [FORMAT="format string"]>TimeToFormat</PSFORMAT> Note: SOURCETZ and DESTTZ have the same format as the DateTimeToTimeZone() PeopleCode function. FORMAT has the same syntax as the DateTimeToLocalizedString() PeopleCode Function. |
Formatted Time. |
|
DateTime |
<PSFORMAT TYPE="DATETIME" [SOURCETZ="Source Time Zone"][DESTTZ="Destination Time Zone"] [FORMAT="format string"]>DateTimeToFormat</PSFORMAT> Note: SOURCETZ and DESTTZ have the same format as the DateTimeToTimeZone() PeopleCode function. FORMAT has the same syntax as the DateTimeToLocalizedString() PeopleCode Function. |
Formatted DateTime. |
|
Number |
<PSFORMAT TYPE="NUMBER" FORMAT="format string" [WIDTH="width"] [PRECISION="precision"]>NumberToFormat</PSFORMAT> Note: FORMAT, WIDTH, and PRECISION have the same format as the NumberToDisplayString() PeopleCode Function. |
Formatted Number. |
|
Currency |
<PSFORMAT TYPE="CURRENCY" FORMAT="format string" [WIDTH="width"] [PRECISION="precision"] [CURRENCY_CODE="CODE "] [CURRENCY_DECORATION="SYMBOL/CODE/BOTH "]>NumberToFormat</PSFORMAT> Note: FORMAT, WIDTH, and PRECISION have the same format as the NumberToDisplayString() PeopleCode Function. CURRENCY_CODE can be one of the supported PeopleSoft currency codes, or if left blank, the default is the user's currency code. CURRENCY_DECORATION can have the value of SYMBOL (currency symbol appears before the number), CODE (currency code appears after the number), or BOTH (the default). |
Formatted Number with currency symbol and/or currency code. |