Skip to Content
0
May 12, 2020 at 06:11 AM

Validate SystemDateTime in groovy script used in SAP CPI

503 Views

Hi,

I'm trying to get the system datetime by declaring this in content modifier and then getting that value into groovy script for a validation.

// Declaring the date in CM

datetimeformat.png

format used is :

${date:now:yyyy-MM-dd'T'HH:mm:ss'Z'}

In the groovy script I have declared as below.

def today = map.get("Today");

it.employmentNav.EmpEmployment.endDate.text() < today

the value for 'endDate' from EC comes as '2020-02-16T00:00:00.000' .

So when I'm trying to execute the iflow, this is not recognizing the correct date format, somewhere its going wrong,

can you please help on this?

Attachments

datetimeformat.png (14.7 kB)