Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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.

question from:https://stackoverflow.com/questions/65861197/how-do-i-convert-milliseconds-into-datetime-in-power-bi

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
926 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...