Returns a value of type xs:dateTime built from any combination of the following parts as arguments: year, month, day, hour, minute, second, millisecond, and timezone. This function automatically normalizes the supplied parameters. For example, 32nd of January will automatically be changed to 1st of February.
Built-in, C++, C#, Java.
Provides the year.
Provides the month.
Provides the day of the month.
Optional. Provides the hour.
Optional. Provides the minute.
Optional. Provides the second.
Optional. Provides the millisecond.
Optional. Provides the timezone, in minutes. This value can be negative.
The following mapping constructs an xs:dateTime value from parts that are supplied by constants.
The mapping output is 2020-04-17T08:58:54.333-01:00.
For another example, see the IDoc_Order.mfd mapping from the <Documents>\Altova\MapForce2022\MapForceExamples\ folder. This mapping illustrates how to read data from SAP IDoc instance files. It contains a user-defined function "convertIDOCDate" which assembles the xs:dateTime value from two input strings, using the left-trim and substring functions.
The dateString and timeString components are parameters to the user-defined function. They are supplied by the main mapping, from the SAP IDoc instance file:
In this mapping, the date value as a string is 19990621. The time value is 0930. Consequently, the datetime-from-parts function returns the value 1999-06-21T09:30:00. This value is also the result of the user-defined function and is written to the Received item of the target XML document.