Purpose
Used for creating a timestamp of the current time, with the specified format.
For defining the output format, it uses the “date and time format strings” as defined by Microsoft. Also here are some formatting strings examples.
Format
TIMESTAMP(output-format)
The function takes 1 parameter which specifies the output format of the created timestamp.
Example
A TabularDataTransformer handler with the following config entry inserts the timestamp at the time of (this function’s) execution, with resolution up to milliseconds, to the MSH-7 field.
<Parameter>
<!-- TIMESTAMP Example -->
<Name>transformation-rule</Name>
<Value>$MSH-7=>TIMESTAMP("yyyyMMddHHmmss-fff")</Value>
</Parameter>
Input | Outcome |
MSH|^~\&|||||| | MSH|^~\&|||||20200411132355-823| |
Related
Nil.