dayofweek在hive2.2.0开始支持
低版本的sparksql和hive中可用以下方式实现

 select 7- datediff(next_day('2018-03-12',"Sunday"),'2018-03-12').  
 select date_format('2018-03-12' ,'u').   
 select date_format(from_unixtime(unix_timestamp('20180313','yyyyMMdd'),'yyyy-MM-dd'),'u')

 

相关文章:

  • 2021-10-24
  • 2021-06-12
  • 2021-06-09
  • 2022-12-23
  • 2022-01-08
  • 2022-02-22
  • 2021-08-01
猜你喜欢
  • 2021-11-23
  • 2021-09-05
  • 2021-09-03
  • 2022-12-23
  • 2021-04-22
  • 2022-01-14
相关资源
相似解决方案