cancel
Showing results for
Did you mean:
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.

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
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)`

7 REPLIES 7
Highlighted
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)`

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!

Frequent Visitor

## Re: Converting UNIX time to Date in PowerBI for Desktop

hi

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

Frequent Visitor

## Re: Converting UNIX time to Date in PowerBI for Desktop

hi

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

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)
New Member

## Re: Converting UNIX time to Date in PowerBI for Desktop

Hi i make this video to explain

https://youtu.be/3N27eS2oJmA

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.

Announcements

#### Challenge: Can You Solve These?

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

#### Community News & Announcements

Get your latest community news and announcements.

#### 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.

#### Win Power BI Swag with Community Kudopalooza!

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

Top Kudoed Authors
Users Online
Currently online: 177 members 1,831 guests
Recent signins: