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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2018 07:03 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2018 08:09 AM
Additionally if I run the following PS script:
(Get-Date 1/1/1601).AddDays(131001091660000000/864000000000)
It gives me the converted time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2018 07:03 AM
This could be helpful.
https://community.servicenow.com/community?id=community_blog&sys_id=6c9ceae1dbd0dbc01dcaf3231f961931

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2018 07:48 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2020 01:17 AM
Did you manage to find where to put this code? In the source field script or explicit transform script?