Sunday, June 25, 2017

WSO2 - How to assign system date time to a property?

You can get the system time very easily as below

<property name="StringVal" expression="get-property('SYSTEM_DATE')"/>

And also you can format the Date & Time according to your requirement as below.

<property name="StringVal" expression="get-property('SYSTEM_DATE', 'yyyyMMddHHmmss')"/>

Year - y
Month - M
Day - d
Hour - H
Minute - m
Second - s

Enjoy..!

No comments:

Post a Comment