[英]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.我有一张有 13 位时间戳(我相信毫秒)的表,但由于某种原因我无法在 Power Bi 中转换它们。 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)
(这是来自转换数据和添加自定义列之后)
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.任何帮助,将不胜感激。
The problem is likely that your [Created]
column is formatted as text.问题可能是您的
[Created]
列被格式化为文本。
Try converting that column to a numerical type before writing a custom column that tries to divide by 1000.在编写尝试除以 1000 的自定义列之前,尝试将该列转换为数字类型。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.