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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Xilitor
Helper I
Helper I

UNIX time to date

Hello,

 

I have found two methods online which I have tried but it doesn't give the correct result.

I believe it's because my UNIX time is much larger when comparing to others.

I've tried this method:

Xilitor_1-1600084754003.png

 

 

And this method:

Xilitor_0-1600084726043.png

 

I've also tried to add a new query but I didn't succeed with that as well.

I hope someone can help.

 

BR

 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@Xilitor Have you tried it in DAX?

https://community.powerbi.com/t5/Quick-Measures-Gallery/Unix2UTC-and-UTC2Unix/m-p/620012#M292

If it is much larger, is it because it is in milliseconds?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
Greg_Deckler
Super User
Super User

@Xilitor Have you tried it in DAX?

https://community.powerbi.com/t5/Quick-Measures-Gallery/Unix2UTC-and-UTC2Unix/m-p/620012#M292

If it is much larger, is it because it is in milliseconds?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

You were right!

It helped changing to this:

Xilitor_0-1600085466152.png

 

I don't know if I understand. Like this?

Xilitor_0-1600085159130.png

 

@Xilitor , In power query

DateTimeZone.ToLocal(#datetimezone(1970,1,1,0,0,0,0,0) + #duration(0,0,0, [UNIX timestamp]))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.