cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Bokbob Regular Visitor
Regular Visitor

Converting UNIX time to Date in PowerBI for Desktop

Hi, i am having issues converting the time in Unix time (60*60*24) to date time.

 

i tired http://stackoverflow.com/questions/35650485/how-to-convert-unix-time-to-date-in-powerbi-for-desktop

 

and https://community.powerbi.com/t5/Integrations-with-Files-and/Converting-Unix-timestamp-from-Stripe-A...

 

but i couldnt get it to work. i have the values like the attached in first picture. Please help me convert this number to datetime.Capture.PNG

 

 

Capture-2.PNG

 

 

Capture-3.PNG

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Moderator Eric_Zhang
Moderator

Re: Converting UNIX time to Date in PowerBI for Desktop

@Bokbob

You can add a custom column

#datetime(1970, 1, 1, 0, 0, 0) + #duration(0, 0, 0, [UnixTime]/1000)

Capture.PNG

View solution in original post

7 REPLIES 7
Highlighted
Moderator Eric_Zhang
Moderator

Re: Converting UNIX time to Date in PowerBI for Desktop

@Bokbob

You can add a custom column

#datetime(1970, 1, 1, 0, 0, 0) + #duration(0, 0, 0, [UnixTime]/1000)

Capture.PNG

View solution in original post

caito103 Regular Visitor
Regular Visitor

Re: Converting UNIX time to Date in PowerBI for Desktop

Hey!

And how can i apply this formula but with a specified Time Zone?

 

Thank you!

migue7899 Frequent Visitor
Frequent Visitor

Re: Converting UNIX time to Date in PowerBI for Desktop

hi 

 

I have the same problem my time zone is gmt -6?

migue7899 Frequent Visitor
Frequent Visitor

Re: Converting UNIX time to Date in PowerBI for Desktop

hi 

 

I have the same problem my time zone is gmt -6?

MarcelBeug Super Contributor
Super Contributor

Re: Converting UNIX time to Date in PowerBI for Desktop

Adjust the formula with -6 as hours in the #duration part:

 

#datetime(1970, 1, 1, 0, 0, 0) + #duration(0, -6, 0, [UnixTime]/1000)

 

Specializing in Power Query Formula Language (M)
DaviDamasceno New Member
New Member

Re: Converting UNIX time to Date in PowerBI for Desktop

Hi i make this video to explain

 

https://youtu.be/3N27eS2oJmA

 

Smiley Very Happy

jpwilkinson New Member
New Member

Re: Converting UNIX time to Date in PowerBI for Desktop

Thanks for the post, i got it to work for my data.  Only one point was that the unit time I had was unix time in s not ms, so I didn't need the /1000.  I think unix time is quite common in both formats.

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 177 members 1,831 guests
Please welcome our newest community members: