Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
danielbreton
New Member

active directory LastLogon

How can I convert Active Directory Last Logon to a readable date?

 

Active Directory stores date/time values as the number of 100-nanosecond intervals that have elapsed since the 0 hour on January 1, 1601 until the date/time that is being stored.  The time is always stored in UTC. 

 

I would like to display the date in EST.

 

Thanks

 

1 ACCEPTED SOLUTION
danielbreton
New Member

Found it

 

Last Logon = IF(user[user.lastlogon]>0, user[user.lastlogon]/8.64*10^11)-109205, DATE(2000,01,01))

 

 

View solution in original post

3 REPLIES 3
danielbreton
New Member

Found it

 

Last Logon = IF(user[user.lastlogon]>0, user[user.lastlogon]/8.64*10^11)-109205, DATE(2000,01,01))

 

 

Brian_M
Continued Contributor
Continued Contributor

Hi Daniel, can I ask are you querying AD on prem or is it Azure AD? I'm having trouble getting the domain and credentials right for the initial get data step. Any help would be much appreciated!

Thank you so much everyone.  I am puulling the computer object and I can get the last logon date, I am looking for the last logon name.  Or mayeb a list of all users who have logged into that machine

 

I am connecting to AD by going to data source other cna picking AD and my current domain auto poulates

Helpful resources

Announcements
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.