如何在hive中计算小时差?
hive吧
全部回复
仅看楼主
level 1
lixincen 楼主
现在只知道datediff计算日期差的方法。。求高手指教~
2017年04月08日 06点04分 1
level 3
unix_timestamp(string date, string pattern)转化为bigint,然后用算术运算直接做差,再除以3600?可以试试
2017年04月19日 07点04分 2
level 1
可以么?
2017年06月27日 15点06分 3
level 1
可行!
select unix_timestamp('2017-04-13 23:59:59','yyyy-MM-dd hh:mm:ss') - unix_timestamp('2017-04-13 22:59:59','yyyy-MM-dd hh:mm:ss')
2017年07月05日 01点07分 4
没用,unix_timestamp(字段名),显示NULL
2019年08月09日 07点08分
1