星空网 > 软件开发 > 数据库

MYSQL 两日期之间的工作日(除去周六日,不考虑节假日)

select (floor(days/7)*5+days%7  
    -case when 6 between wd and wd+days%7-1 then 1 else 0 end  
    -case when 7 between wd and wd+days%7-1 then 1 else 0 end ) INTO str
from  
(select datediff(e,s) as days,weekday(s)+1 as wd) as a;    
    ELSE

    select (-(floor(days/7)*5+days%7  
    -case when 6 between wd and wd+days%7-1 then 1 else 0 end  
    -case when 7 between wd and wd+days%7-1 then 1 else 0 end)  ) into str
from  
(select datediff(s,e) as days,weekday(e)+1 as wd) as a;    
    end if;
RETURN str;
END
select first_func('2015-11-17','2015-11-20')




原标题:MYSQL 两日期之间的工作日(除去周六日,不考虑节假日)

关键词:MYSQL

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

珠海梦幻水城有哪些游玩设施:https://www.vstour.cn/a/400232.html
珠海梦幻水城官网网址:https://www.vstour.cn/a/400233.html
珠海梦幻水城园区地址:https://www.vstour.cn/a/400234.html
珠海梦幻水城什么时候开园?:https://www.vstour.cn/a/400235.html
文化旅游景观该怎么做规划设计?:https://www.vstour.cn/a/400236.html
Shopee菲律宾站实施快速出货计划;TikTok开发虚拟网红全天候直播:https://www.kjdsnews.com/a/1838692.html
怪物在游轮上复活的电影 怪物在游轮上复活的电影叫什么:https://www.vstour.cn/a/411230.html
在线旅游如何选择更优惠的旅游产品?:https://www.vstour.cn/a/411231.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流