Transform from date/time
Transformer with multiple options for converting date/time values.
Option convert datatype allows you to convert XSD date/time data types to XSD string data type.
Option time zone operations allows you to modify the time zone information from a source attribute or the output from a previous operation. These options are only available for xs:dateTime
, xs:date
and xs:time
data types.
Selecting custom XPath allows you to fully control the transformation of any value by entering your own custom XPath expression to handle the conversion. Technically, the XPath you enter will be used for the <xsl:value-of>
statement in the generated stylesheet. Use the view XSLT button to see a preview of how your XPath will be embedded in the resulting XSLT.
Currently, it is only possible to do a string conversion. This action will convert the source value to a xs:string
If the source is xs:dateTime
, xs:date
, or xs:time
, you can customize the output format and timezone. For other date/time data types, the conversion will output the attribute's value according to the fn:string
function.
For conversions between two date/time attributes, you can add an additional String Transformer with a date/time conversion.
Remove timezone will remove all timezone information from the input date/time without changing its value. For example, applying this function to the xs:dateTime
2014-01-01T04:45:30.000+01:00 will result in 2014-01-01T04:45:30
Adjust to timezone will adjust the given date/time to the specified timezone (respecting the original timezone). For example, applying this function to the xs:dateTime
2014-01-01T04:45:30.000+01:00 and 'America/New_York' timezone will result in 2013-12-31T22:45:30-05:00
Transformer with multiple options for converting date/time values.
Transformer with multiple options for converting date/time values.
Option convert datatype allows you to convert XSD date/time data types to XSD string data type.
Option time zone operations allows you to modify the time zone information from a source attribute or the output from a previous operation. These options are only available for xs:dateTime
, xs:date
and xs:time
data types.
Selecting custom XPath allows you to fully control the transformation of any value by entering your own custom XPath expression to handle the conversion. Technically, the XPath you enter will be used for the <xsl:value-of>
statement in the generated stylesheet. Use the view XSLT button to see a preview of how your XPath will be embedded in the resulting XSLT.
Date format
Date and time format delimiter
Time format
Time zone format
The time zone to use when formatting the output string. If the input has time zone information, you can preserved it by leaving this field empty, otherwise it will use zone information with the selected value.
Pattern to use for formatting the output of a date/time data type. The pattern is created based on your date, time, timezone, and delimiters selection. You can create your own custom format by using the generated pattern as a starting point.
More information about the pattern format syntax can be found in the Documentation
Date/time and zone format delimiter
Allows you to fully control the transformation of an attribute value by specifying custom XPath.
You can use the token [%previousOutput%] to refer to the previous generated XPath and use it in the current transformer, e.g. if ([%previousOutput%]!='') then [%previousOutput%] else 'test'
See also: W3C XPath specification