unix_timestamp()函数:
返回值: bigint说明: 获得当前时区的UNIX时间戳
举例:
hive> select unix_timestamp() from dual;1455616811
hive> select unix_timestamp('20180303','yyyyMMdd') from dual;1520006400
hive> select unix_timestamp('20180303','yyyyMM') from dual;2308752000
hive> select unix_timestamp('20180304','yyyyMM') from dual;2311430400 hive> select unix_timestamp('201803','yyyyMM') from dual;1519833600 hive> select unix_timestamp('20180301','yyyyMM') from dual; 2303654400