问题已解决
請(qǐng)問老師,日期怎么計(jì)算出星期?



你好這個(gè)得要有一個(gè)初始的數(shù)據(jù)才能得到。
你要知道1號(hào)是星期幾,你才能夠知道20號(hào)是星期幾。
2024 11/22 08:52

84785004 

2024 11/22 08:52
好的,那么應(yīng)該怎么設(shè)置呢?

宋生老師 

2024 11/22 08:54
如果1號(hào)是星期一,并且你想要計(jì)算20號(hào)是星期幾,你可以使用以下步驟:
確定20號(hào)與1號(hào)之間的天數(shù)差。由于1號(hào)是星期一,20號(hào)與1號(hào)相差19天。
使用WEEKDAY函數(shù)計(jì)算20號(hào)是星期幾。
在Excel中,你可以這樣設(shè)置公式:
excel
=WEEKDAY(DATE(2024,1,20), 2) - WEEKDAY(DATE(2024,1,1), 2) + 1
