pmod(datediff(etd,'1920-01-01')-3,7)='0'表示某天对应的周几,数值为0~6
IF(pmod(datediff(etd,'1920-01-01')-3,7)='0',7,pmod(datediff(etd,'1920-01-01')-3,7))表示:
如果pmod(datediff(etd,'1920-01-01')-3,7)='0',则返回7,否则返回pmod(datediff(etd,'1920-01-01')-3,7)其目的是为了将周0转化成周7.
参考:
https://blog.csdn.net/weixin_37536446/article/details/87795012