PARTNERS - Please join us for our upcoming webinar:
Leveraging Intelligent Recommendations for Operational Transformation.
AMS Partners Click HERE | EMEA/APJ Click HERE

how to convert string into date in AD and Rest connection for create and update

Sreejith
New Contributor III
New Contributor III

We are storing enddate in customproperty39 as : 20240510 from from import.

Now i need to flow this value to AD and servicenow(Rest Connection)

below what i currently using and not working.

 

AD Connection : 

"accountExpires": "${if((user.employeeType.equals('Contractor'))&(user?.customproperty39!=null)){10000*(user?.customproperty39.getTime()+11644473600000+18400000)} else {'0'}}"

Rest Connection :

 \"u_employee_end_date\":\"${if(user.customproperty6='X'){Calendar c=Calendar.getInstance();c.setTime(user.customproperty39);c.add(Calendar.HOUR,6);c.getTime().format(\"yyyy-MM-dd HH:mm:ss\")} else {''}}\"

1 REPLY 1

prafullgoyal
Saviynt Employee
Saviynt Employee

@Sreejith ,

Try

${Date.parse('yyyyMMdd',user?.customproperty39).format('yyyy-MM-dd')}

 

 

If you find the above response useful, Kindly Mark it as "Accept As Solution".