Equinox
Equinox

Reputation: 51

Convert Unix Timestamp to Datetime in Power BI

Good morning Stack Overflow,

I have a question, I do have a list of Timestamp, I believe there are Unix Time Stamp, I'd like to convert to datetime on PBI, but I'm getting an error, using the following formula :' #datetime(1957,1,1,0,0,0) + #duration(0,0,0,[Timestamp]) ' , Timestamp is the column that I'd like to convert.

Below a sample list of the data :

enter image description here

Is there a way to fix this issue?

Upvotes: 3

Views: 8580

Answers (1)

Alexis Olson
Alexis Olson

Reputation: 40204

You're close but you need to remember that Unix timestamps are recorded in milliseconds since 1970, not seconds since 1957. Try this instead

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

Make sure the column is a datetime data type.

Upvotes: 6

Related Questions