使用Google表格/ Excel获取从今天起的当前星期几(星期日)

时间:2020-10-13 14:31:45

标签: google-sheets excel-formula google-sheets-formula

我需要从今天开始获取当前星期日的日期。

我已经尝试过了,但是它给出了前一周的星期日,预计日期是11 Oct 2020(今天是13 Oct 2020

今天是vs期望值

Formula that uses this Date -> Result
10 Oct ->  04 Oct
11 Oct  -> 11 Oct
12 Oct  -> 11 Oct
13 Oct  -> 11 Oct
14 Oct  -> 11 Oct
15 Oct  -> 11 Oct
16 Oct  -> 11 Oct
17 Oct  -> 11 Oct
18 Oct  -> 18 Oct
19 Oct  -> 18 Oct

    =TODAY() - (WEEKDAY(TODAY()) - 1) - 7

2 个答案:

答案 0 :(得分:3)

日期在 A 列中,在 B1 中输入:

=A1-(WEEKDAY(A1)-1)

enter image description here

答案 1 :(得分:1)

我已经尝试过了,但是它给出了前一周的星期日,预计日期是 2020年10月11日(今天是2020年10月13日)

您不需要-7。只需尝试:

=TODAY() - (WEEKDAY(TODAY()) - 1)

,如另一个答案所建议的那样,将Today()替换为所需的日期。

相关问题