How to convert AD filetime (last logon value eg:131624069521116676) to Date Time format

Shawn Horley
Kilo Guru

Greetings Folks!

So I get errors from my LDAP OU Definitions where it fails to format the Last Logon value to a Date/Time format (MM-dd-yyyy HH:mm:ss) through my transform maps. I've learned that the value coming from AD is an integer value eg: 131624069521116676, and the error states: com.glide.db.impex.transformer.TransformCoercionException: Unable to format 131624069521116676 using format string MM-dd-yyyy HH:mm:ss for field last_login

Do I have any options that will convert this to usable data?

I've attached the full error that I get in my Logs

Appreciate any suggestions!

 

Cheers

 

Shawn

8 REPLIES 8

Additionally if I run the following PS script: 

(Get-Date 1/1/1601).AddDays(131001091660000000/864000000000)

It gives me the converted time

purbalipc
Tera Expert

This could be helpful.

 

https://community.servicenow.com/community?id=community_blog&sys_id=6c9ceae1dbd0dbc01dcaf3231f961931

 

Thank you for that Purbalipc. I had found that script page, and now I am going down the rabbit hole of learning whether that example would be an Explicit Transform Map script or a Transformation Event script...

 

I appreciate the feedback!


Cheers

Arthwys

Did you manage to find where to put this code? In the source field script or explicit transform script?