hive中对时间处理的函数总结
日期转为时间戳
unix_timestamp('2022-11-12 00:00:00.000')
结果:1668182400
from_unixtime(unix_timestamp('2022-11-12 00:00:00.000'), 'yyyy-MM-dd')
结果:2022-11-12
将20220101类型的时间字符串转换为时间戳
unix_timestamp('20220101', 'yyyyMMdd')
from_timestamp('20220101', 'yyyyMMdd')
本文来自博客园,作者:jsqup,转载请注明原文链接:https://www.cnblogs.com/jsqup/p/17078547.html

浙公网安备 33010602011771号