在 Presto 中投射迄今为止的 unix 时间 [英] Casting unix time to date in Presto
本文介绍了在 Presto 中投射迄今为止的 unix 时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有自纪元 (ms) 以来存储的时间戳,我想使用格式为yyyy-mm-dd"的日期查询和显示结果.
I have timestamps stored in time since epoch (ms) and I would like to query and display results using a date formatted like 'yyyy-mm-dd'.
推荐答案
cast(from_unixtime(unixtime) as date)
参见 https://prestodb.io/docs/current/functions/datetime.html 更多日期时间函数.
See https://prestodb.io/docs/current/functions/datetime.html for more datetime functions.
这篇关于在 Presto 中投射迄今为止的 unix 时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文