Account expiry dates

andrewnorris
Giga Contributor

Hello

We currently import our users from active directory to SNC via the LDAP plugin. I want to bring over the account expiry dates too but as this is stored in Integer8 format it will need some transform scripting to get it to show a human-readable date format.

I'm afraid I have no idea how to convert Integer* to the current date format. Can anyone offer help or guidance?

Thanks
Andy

33 REPLIES 33

Brett,

That's superb, it works really well. Thanks you so much for your help, this will make automating the lockout of expired accounts much easier.

Best regards,
Andrew


Glad to hear it. Enjoy!


This was very helpful! Thank you!



Just a side note, After I applied this, I was finding that the date field on the User table was actually showing the next day (i.e AD would show 02/06/14 and ServiceNow would show 03/06/14). I changed the Expiry Date field on the user table from Glide Date Time, to Glide Date and it resolved the issue - just thought I'd add this in in case anybody else had this issue!


Hello Scott,



I am also having the problem with the dates as it shows next day in the Users form (i.e AD would show 02/06/14 and ServiceNow would show 03/06/14).


I changed the account expiry field on the users form to Glide Date but it still shows the wrong date.



Please suggest if there is any other thing i need to do to correct it.



Regards


Manish


Hi Manish,



Hmm that is wierd. A few things to try (in this order)
- Clear all existing Values from the Expiry Date field


- run a cache.do


- Run your LDAP Sync again, see if the correct dates populate.



Im curious whether any of this helps, so please let me know



Cheers


- Scott