Click HERE to see how Saviynt Intelligence is transforming the industry. |
03/13/2024 12:01 PM
Hello!
I am attempting to convert the incoming StartDate and EndDate dates (mapped to ValidFrom and ValidThrough, respectfully) in the ImportAccountEntJSON. We are reading in the dates as:
I have tried setting the attribute "dateFormat" (inside of "globalSettings") to:
and set my date attributes and values to:
"colsToPropsMap": {
Is a date conversion possible in this way?
Solved! Go to Solution.
03/14/2024 12:48 AM
you can try like below format
${new java.text.SimpleDateFormat('MM-dd-yyyy').format(user.startdate)}
03/14/2024 11:50 AM
Hi Raghu!
Thank you for your response!
Where would this go in the ImportAccountEntJSON? StartDate and EndDate are coming from an external application, so those values wouldn't be in the user table.
Thank you,
- Wes
05/28/2024 05:00 AM
Hi @Raghu may i know whether it will work for a customproperty that pass enddate(string) : 20240517 from HCM data. if yes can you provide the json for create account AD taks.
I mean how to convert CP39 to account expiry in AD on below json.
"accountExpires": "${if((user.employeeType.equals('Contractor'))&(user?.customproperty39!=null)){10000*(user?.customproperty39.getTime()+11644473600000+18400000)} else {'0'}}",
05/28/2024 06:50 AM
Above just supporting in import json of rest.
prefer creating new thread for your ask
05/28/2024 07:06 AM
@rushikeshvartak i already created thread and please go through it.
Solved: Converting Date Format in Rest Connector Account I... - Saviynt Forums - 81520
how to convert string into date in AD and Rest con... - Saviynt Forums - 96297
03/14/2024 08:07 PM
"colsToPropsMap": {
03/15/2024 04:18 PM
Hi Rushikesh,
Unfortunately no luck here, I don't think Saviynt was recognizing "datetime" as a data type.
Thank you,
- Wes
03/17/2024 06:09 PM
Use const ${Calendar.getInstance().getTime().format('yyyyMMddHHmmss')}Z function
03/21/2024 02:12 PM
This doesn't seem to work unfortunately. When I try to put any sort of Groovy code or function in the contents of the date conversion value, it either fails to import that value or it spits out exactly what I have written in.
For example, I tried this earlier:
03/21/2024 06:46 PM
Can you confirm saviynt version. As above logic works for us
03/25/2024 01:32 PM
So this does look to work, but it is populating the current time and not imported time unfortunately (I tested this in a customproperty.
I tried populating the validfrom/validthrough attributes by using this to see what would happen and it appears that they were not populated (even after I changed the datatype to "date")
03/25/2024 07:29 PM
try
millisec
04/15/2024 01:55 PM - edited 04/15/2024 01:56 PM
It took a while, but I figured out something I was doing previously works, I just inputted it slightly different now. All I had to add was this:
06/07/2024 07:59 AM
@Wes Do you mind sharing the full config with this added? I am having a similar problem.
06/07/2024 08:49 AM
06/07/2024 11:09 AM
Thanks. Is the global setting date format you have corresponding to the format in the downstream system or the format you want to store it in in saviynt? I am trying to use the OOTB DUO connector but their config provided doesn't work for last_login which they have coded as a datemillis type. The value returned from DUO is a unix timestamp so I would have expected that to work with datemillis.
The DUO connector is basically an obsfucated REST connector so I was hoping the accountAttributeMapping json config would work similarly to a rest connection AccountEntImportJSON config.
06/07/2024 12:05 PM
The date format in the global setting would be corresponding to the downstream system format for the import. The connected application uses ISO 8601 time, so that is what I set it as here (minus the timezone 'Z' bit).
06/07/2024 12:21 PM
I see, corresponds to downstream system. So I would need to figure out the format for a unix timestamp since the value doesnt come across in an actual datetime format.