KyleAT
KyleAT

Reputation: 71

How do I convert milliseconds into DateTime in Power Bi?

I have a table that has 13 digit timestamps (milliseconds I believe) but I can't convert them in Power Bi for some reason. I've looked at many methods online and it should work but I keep getting an error each time I try to convert. (This is from transform data and after adding a custom column)

enter image description here

When I try to convert the timestamps in "created" column into a new custom column I get an error. This is the formulae I use when creating a new column.

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

This apparently works for other people who have the same problem but not for me and I'm not sure why that is, I just keep getting Errors.

Any help would be appreciated.

Upvotes: 2

Views: 4901

Answers (1)

Alexis Olson
Alexis Olson

Reputation: 40204

The problem is likely that your [Created] column is formatted as text.

Try converting that column to a numerical type before writing a custom column that tries to divide by 1000.

Upvotes: 1

Related Questions