select
case when pmod(datediff(local_time,'2018-01-01') + 1,7) = 1 then 'Monday'
when pmod(datediff(local_time,'2018-01-01') + 1,7) = 2 then 'Tuesday'
when pmod(datediff(local_time,'2018-01-01') + 1,7) = 3 then 'Wednesday'
when pmod(datediff(local_time,'2018-01-01') + 1,7) = 4 then 'Thursday'
when pmod(datediff(local_time,'2018-01-01') + 1,7) = 5 then 'Friday'
when pmod(datediff(local_time,'2018-01-01') + 1,7) = 6 then 'Saturday'
else 'Weekend'
end time_interval
from
ccsd.ecc_week_operation_peak;
Hive sql 获取当前日期是周几(星期几)
最新推荐文章于 2025-06-02 21:24:52 发布