IF(instr(substr(updated_at,1,10),'-')>0,date(substring(substr(updated_at,1,10),1,10)),date(from_unixtime(unix_timestamp(substring(substr(updated_at,1,10),1,10),'yyyymmdd'),'yyyy-mm-dd')))>=current_date - INTERVAL '3' DAY

select from_unixtime(unix_timestamp('20210101','yyyymmdd'),'yyyy-mm-dd')
,date(from_unixtime(unix_timestamp('20210101','yyyymmdd'),'yyyy-mm-dd'))

hive  数值(20210101)转日期(2021-01-01)

 

相关文章:

  • 2022-01-02
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2021-07-14
  • 2021-10-14
  • 2021-06-17
  • 2022-02-18
猜你喜欢
  • 2021-08-22
  • 2022-12-23
  • 2021-09-26
  • 2021-12-04
  • 2021-01-21
  • 2021-10-02
相关资源
相似解决方案