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)

你可能感兴趣的:(sql,BUG)