Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

We want to pass the date in 20200516000000.0Z format in AD.

adityachadde
New Contributor III
New Contributor III

Hi Team,

We want to pass the date in 20200516000000.0Z format in AD. 

We are currently receiving date in 

20240522 format how should we pass it?
 
Is it possible to achieve this in via ADSI connection?
 
Best Regards,
Aditya Chadde
[This post has been edited by a Moderator to move to its own thread.]
16 REPLIES 16

DixshantValecha
Saviynt Employee
Saviynt Employee

Hi,

We are checking on your request and we will keep you posted.

Hi @DixshantValecha ,

please provide an update on this.

Thanks

 

NikitaPawar_
New Contributor III
New Contributor III

Hello Aditya,

Try with this by adding it in your JSON,
"dateFormat": "yyyyMMddHHmmss.0Z"


Thanks,
Nikita Pawar
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi,

 

We have tried it by hardcoding the value as below 

PersonStartDate:20200516000000.0Z, postalCode:null, msDS-cloudExtensionAttribute5:280920230010, departmentNumber:65872P, homeDrive:U:, homeDirectory:\, baseDnt, password=******&6$bBktp, pwdLastSet:0]], connectionString:[LDAP://xxxxxxtest.net:636]]"

getting below error

"OBJ_ERR_00001 : -2146233033 : String was not recognized as a valid DateTime." } 

[This message has been edited by moderator to mask sensitive info]

rushikeshvartak
All-Star
All-Star
  • Can you confirm in which json you want to pass ?
  • Is this AD or ADSI connector?

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Hi @rushikeshvartak,

 

I want to pass it in ADSI JSON We are getting below error in logs

"OBJ_ERR_00001 : -2146233033 : String was not recognized as a valid DateTime." } 

Date.parse("yyyyMMdd", "20240522").format("yyyyMMddHHmmss.0'Z'")


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Hi,

Tried with this "PersonStartDate":"${if(user.customproperty14 == null){''}else{Date.parse("yyyyMMdd", user.customproperty14).format("yyyyMMddHHmmss.0'Z'")}}",

 

Getting error as below:

User a.PStestdp10 is not activeCannot get property 'url' on null object

Best Regards,

Aditya Chadde

"PersonStartDate": "${if (user != null && user.customproperty14 != null) { Date.parse("yyyyMMdd", user.customproperty14).format("yyyyMMddHHmmss.0'Z'") } else { '' }}"


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

"PersonStartDate": "${user?.customproperty14 ? Date.parse('yyyyMMdd', user.customproperty14).format('yyyyMMddHHmmss.0Z') : ''}"

adityachadde
New Contributor III
New Contributor III

Hi @DixshantValecha,

It's not working the date is not getting updated and in the logs we are seeing date is parsed to incorrect format PersonStartDate:20240522000000.0+0000 it should be in 20200516000000.0Z format. and when we are trying with Rushikesh's format date is converted to the correct format but we are getting error as "System.FormatException: String was not recognized as a valid DateTime."

and when we are passing this format from via powershell script it's working but from Saviynt it's not

 

Best Regards,

Aditya Chadde 

Re: We want to pass the date in 20200516000000.0Z ... - Saviynt Forums - 95411


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Hi @rushikeshvartak,

Basic date time conversion is fine but our issue is not resolved yet all the date formats are not working I tried with various formats other than the formats shared by you in json it was working from the start and even tried hardcoding the date with different formats but no luck. We tried with the below formats.

 

12/15/2023 12:00:00 AM

20240516000000.0Z

20240516000000.0

20240516000000

12-05-2023 12:00:00 AM

2023-07-17T00:00:00.0000Z

 

Best Regards,

Aditya Chadde

Unfortunately i am unable to reply as json.

 

i have sent new logic 


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Hi,

Provided format is not working getting same error.

Best regards,

Aditya Chadde

"PersonStartDate": "${user?.customproperty14 ? new java.text.SimpleDateFormat('yyyyMMdd').parse(user.customproperty14).format('yyyyMMdd000000.0Z') : ''}"

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.