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
 

 

相关文章:

  • 2021-05-11
  • 2021-11-03
  • 2022-01-10
  • 2021-10-28
  • 2021-05-27
  • 2022-12-23
  • 2021-11-09
猜你喜欢
  • 2021-09-05
  • 2021-11-02
  • 2022-12-23
  • 2022-12-23
  • 2021-11-09
  • 2022-01-15
相关资源
相似解决方案