Skip to Content
0
Mar 08, 2021 at 11:59 AM

UTC Unix Datetime to yyyy-MM-dd convert

403 Views

Hi,

I need to convert unix datetime to yyyy-MM-dd in SAP CPI message mapping preferably or a groovy script.

My Input xml is -

<?xml version="1.0" encoding="UTF-8"?> <root> <record> <value1>1615204493000</value1> <value2>1515204493000</value2> </record> </root>

My Output xml is -

<?xml version="1.0" encoding="UTF-8"?> <root> <record> <value1>2021-03-08</value1> <value2>2018-01-06</value2> </record> </root>

Can you please let me know how can we achieve it.

Regards