We're giving away 30 tickets for FREE! Share your story, your vision, or your hustle and tell us why YOU deserve a ticket.
Apply nowWin a FREE 3 Day Ticket to FabCon Vienna. Apply now
Hello,
I am trying to convert the active directory user.lastlogon and user.lastlogontimestamp to readable date and times. The command below which I found on the Internet does not appear to be working for me.
Help!
Last Logon = IF(AD_user[user.lastlogon]>0, (AD_user[user.lastlogon]/8.64*10^11)-109205, DATE(2000,01,01))
Solved! Go to Solution.
Try the following code:
Last Logon = IF( AD_user[user.lastLogonTimestamp] > 0, AD_user[user.lastLogonTimestamp] / 864000000000 - 109205, DATE(2000,1,1) )
Make sure you assign the correct data type and that the default summarization is set to don't summarize. You can select the desired format.
Try the following code:
Last Logon = IF( AD_user[user.lastLogonTimestamp] > 0, AD_user[user.lastLogonTimestamp] / 864000000000 - 109205, DATE(2000,1,1) )
Make sure you assign the correct data type and that the default summarization is set to don't summarize. You can select the desired format.
Thank you!! That did the trick.
A tip for users, I set the last argument to 9999/01/01 to flag that there is no real last logon data available.
User | Count |
---|---|
67 | |
61 | |
47 | |
35 | |
32 |
User | Count |
---|---|
87 | |
72 | |
57 | |
51 | |
45 |