1、Hive中获取当前的时间:
select from_unixtime(unix_timestamp(),'yyyy-MM-dd HH:mm:ss')
2、Hive中计算时间差:
select datediff('2018-06-04','2018-06-05');
1、Hive中获取当前的时间:
select from_unixtime(unix_timestamp(),'yyyy-MM-dd HH:mm:ss')
2、Hive中计算时间差:
select datediff('2018-06-04','2018-06-05');