Search This Blog

xp20:format-dateTime - SOA- Custom format Date Time

xp20:format-dateTime - SOA- Custom format Date Time


Middleware  intreacts with mostly external system - Each system need some custom Date and Time format structure. Most of the time developers not remember Syntax .

Y001 - year
M01 - month
D01 - date
H01 - hour
m01 - minutes
s01   -  seconds
f001 - millsec

Use Ready Made functions:


xp20:format-dateTime(xp20:current-dateTime(),'[Y0001][M01][D01]_[H01][m01][s01]')


Including MillSeconds :

xp20:format-dateTime(xp20:current-dateTime(),'[M01]/[D01]/[Y0001] [H01]:[m01]:[s01].[f001]')

Universal Time format with T :


xp20:format-dateTime(xp20:current-dateTime(),"[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001]")

No comments:

Post a Comment