Parsing date, dateTime, and time values in a Parse XML rule
XSD date
, dateTime
, and time
values use a special formatting that is distinct from Pega Date
,
dateTime
, and TimeOfDay
property value formatting. For
these XSD types, you must specify dateTime
, date
, or
time
as the XSD base type for the property to parse
correctly.
The specified value informs the parse rule to convert the
value to the Pega format before mapping it to the clipboard. Date values that must be
converted to the Pega date format include the following examples:
2021-07-20
05:30:15
2020-01-01T09:00:00
- In the navigation pane of Dev Studio, click Records.
- Expand the Integration-Mapping category, and then click Parse XML.
- Click the row of a parse XML rule to open it.
- On the Mapping tab, double-click an element to open the User Data window.
- On the Type tab of the User Data
window, in the XSD Base Type, enter the following values
based on what your XML value looks like and the property you are mapping it
to.
- If the format of the XML value looks like
2020-01-01T09:00:00Z
, set the XSD Base Type value to dateTime to map the value to a Pega DateTime property. - If the format of the XML value looks like
2020-01-01
, set the XSD Base Type value to date to map the value to a Pega Date property. - If the format of the XML value looks like
09:00:00Z
, set the XSD Base Type value to time to map the value to a Pega TimeOfDay property.
If the XSD Base Type field is left blank, no conversion is performed and the value is mapped to the clipboard as is. - If the format of the XML value looks like
- Click OK.
- Click Save.
Previous topic Configuring XML tree node properties for a Parse XML rule Next topic Defining a page for a Parse XML rule