select (hour(from_unixtime(unix_timestamp(‘2021092907’, ‘yyyyMMddHH’)))-hour(from_unixtime(unix_timestamp(‘2021092807’, ‘yyyyMMddHH’)))+(datediff(from_unixtime(unix_timestamp(‘2021092907’, ‘yyyyMMddHH’)), from_unixtime(unix_timestamp(‘2021092807’, ‘yyyyMMddHH’))))*24) as hour_dValue from aud.test_cdr;
hive中获取两个相差多少个小时
最新推荐文章于 2023-01-09 10:52:58 发布