hive的时间函数
- 取得当前日期
select current_date();
- 取得当前日期时间
select current_timestamp();
- 取得当前时间
select from_unixtime(unix_timestamp(),‘yyyy-MM-dd HH:mm:ss’);
获取的是HiveService所在操作系统RTC(时钟芯片)时间,如下
实例1:
实例2:

hive的时间函数
select current_date();
select current_timestamp();
select from_unixtime(unix_timestamp(),‘yyyy-MM-dd HH:mm:ss’);
获取的是HiveService所在操作系统RTC(时钟芯片)时间,如下
实例1:
实例2: