presto时间转换日期报错 failed: Value cannot be cast to date: 2020-01-27 23:30:30

例 查询语句
 

select

cast('2020-01-27 23:03:53' as date)

from xxx

出现标题错误 failed: Value cannot be cast to date: 2020-01-27 23:30:30 cast('2020-01-27' as date)却没有问题

解决方案:

cast('2020-01-27 23:03:53' as timestamp)

发布了133 篇原创文章 · 获赞 29 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/qq_38403590/article/details/105263593