Altova MapForce 2024 Enterprise Edition

Returns an xs:integer representing the day part of the xs:date value supplied as argument.

mf-func-xpath2-day-from-date

 

Languages

XQuery, XSLT 2.0, XSLT 3.0.

 

Parameters

Name

Type

Description

date

xs:date

The input value of type xs:date.

 

Example

The following mapping converts a string to xs:date using the xs:date constructor function. The day-from-date, month-from-date, and year-from-date functions each extract the respective part of the date and write it to a separate item in the target XML file.

mf-func-xpath2-day-from-date-example

XQuery 1.0 mapping

The mapping output is as follows:

 

<rows>
  <row>
    <col1>30</col1>
    <col2>4</col2>
    <col3>2020</col3>
  </row>
</rows>

© 2017-2023 Altova GmbH