How to determine if a date falls on the weekend?

前端 未结 4 1345
我在风中等你
我在风中等你 2020-12-03 05:03

Given a date as input, how can I determine whether the day falls on a weekend?

4条回答
  •  时光取名叫无心
    2020-12-03 05:34

    Or, you can use this:

    OR(MOD(WEEKDAY(cell), 7)=0, MOD(WEEKDAY(cell), 7)=1)
    

    or

    MOD(WEEKDAY(cell), 7) < 2
    

    as a formula.

    since 1 is Sunday and 0 is Saturday

提交回复
热议问题