gpt4 book ai didi

sql - 如何在 Presto 中将时间戳转换为日期?

转载 作者:行者123 更新时间:2023-12-03 16:45:13 43 4
gpt4 key购买 nike

我喜欢将时间戳列转换为日期和时间格式。我应该如何从 presto 编写查询?我的时间戳是 UTC 时间。非常感谢

Timestamp format"1506929478589"
After query convert it looks like "2016-10-25 21:04:08.436"

最佳答案

您可以转换 timestampdatecast(col as date) date(col) .

关于sql - 如何在 Presto 中将时间戳转换为日期?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46886856/

43 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com