AnsweredAssumed Answered

SQL Date conversion from UNIX for Active Directory

Question asked by Marta Benedetti on Dec 18, 2020
Latest reply on Dec 30, 2020 by Marta Benedetti

Hi,

 

I have a request form with a field "accountExpire" of type "Date Field".

Is there a way to convert the date received from the request form in a FILEDATE format con attribute "accountExpires" in AD using a sql Select node?

 

I've tried this query

select
    to_number((( TO_DATE( ${PublicData_Onboarding_accountExpire}, 'MM/DD/YYYY HH:mi PM') - TO_DATE('1970-01-01', 'YYYY-MM-DD') )) * 86400 + 11644473600 + 18000) * 10000000 as accountExpire
FROM
    dual

 

The problem though is the the value received in the workflow from the request form is a UNIX TIMESTAMP, so this conversion is not working.

Do you have other suggestions?

 

Thanks,

 

Marta

Outcomes