and more in a single search tool across platforms. Read the announcement here. |
11/29/2022 11:02 PM
Hi Team,
we have a custom date column in Active directory which is accepting date like below
We have tried to set value for this like below but its failing throwing groovy syntax error.
${if(user.termDate!=null){new java.text.SimpleDateFormat('YYYYMMDDhh:mm:ss.000').format(user.termDate)}else{''}
Can share any syntax to set this date value or any better way on this ?
11/30/2022 07:03 PM
Please share error from logs.
Please check if below works
new java.text.SimpleDateFormat("YYYYMMDDhh:mm:ss.000").format(new java.util.Date())
12/01/2022 01:16 PM
Tried below its working
"${if(user.termDate != null && user.termDate != ''){ java.time.LocalDate.parse(user.termDate.toString().trim().replaceAll(' 00:00:00', '').replace('.0','')).minusDays(1).toString().replaceAll('-', '')+'235959.0Z'} }",