A Forum reader recently asked:
“I’m trying to display the eDirectory loginTime in NSL whenever user log in to NSL. I have managed to retrieve the eDirectory loginTime in the SYN_TIME format – e.g., 20071016092115Z. I can display that in NSL, but how do I display it in the correct GMT time format?”
And here’s the response from David Guest …
You can solve the problem with a little bit of clever scripting using regex. Try something like this:
regsplit "(....)(..)(..)(..)(..).*" ?LoginTime ?Year ?Month ?Date ?Hour ?Minute MessageBox "You logged in at " ?Hour ":" ?Minute " Today
You may want to do some math on the Hour variable to display it in the form you want (adding or removing hours, for example). But that should work – you can also use the date if you want to.