AD accountExpires conversion using transform in IDN

Hi all,

I am using the below transform to convert termination date incoming from WD to epoch time to be updated to accountExpires attribute in AD. But when the date is updated on AD it shows time and I need to replace that time to 12:00:00 AM.

{“name”:“WD - EndDate Test”,“type”:“dateFormat”,“attributes”: {“input”: {“attributes”: {“expression”:“+1d”,“input”: {“attributes”: {“input”: {“attributes”: {“attributeName”:“TERMINATION_DATE”,“sourceName”:“Workday” },“type”:“accountAttribute” },“inputFormat”:“MM/dd/yyyy”,“outputFormat”:“ISO8601” },“type”:“dateFormat” },“roundUp”:true },“type”:“dateMath” },“inputFormat”:“yyyy-MM-dd’T’HH:mm”,“outputFormat”:“EPOCH_TIME_JAVA” },“internal”:false} Generate epoch time output : 1660953600000in AD it shows up in this format : 01/02/1601 10:08:15 PM UTC Expected format in AD : 01/02/1601 12:00:00 AM UTC

you might need to remove the time from it.

I tried removing the time format still does not work.

so, are those the actual values you get?

it looks like you are adding 1 day to the termination date, which shouldn’t matter, but what we need to do is find the input value, what it spits out in epoch, and what the conversion does.

I’m doing something similar, but because I don’t have the requirement for midnight, I don’t have this issue. I am also exporting to EPOCH_TIME_WIN32 in a type “dateFormat” on the end date.

“inputFormat”: “yyyy-MM-dd’T’HH:mm:ss”,

“outputFormat”: “EPOCH_TIME_WIN32”

I don’t think these will solve your issues, but the goal would be to make sure your input format is always calculated to midnight namely yyyy-MM-dd’T00:00:00

I found this:: https://stackoverflow.com/questions/7556591/is-the-javascript-date-object-always-one-day-off

it might help

Yes I got the same reply from SP PS.

“outputFormat”: “EPOCH_TIME_WIN32”

This is the expected output format and it works.