如何根据给定的开始日期和今天的Google表中的日期来获得下一个两周的日期

发布于 2025-02-11 23:42:50 字数 555 浏览 4 评论 0原文

我试图根据一个开始日期来获得每两周的日期,然后从开始日期开始的14天序列之后,将提供下一个即将到来的日期,以使我获得今天日期之后的日期。

例如,如果开始日期为6/15/2022,我希望每14天的日期每14天,并且使用今天的日期,我想获得下一个下一个日期,该日期仍将遵循14--白天序列。使用今天的日期(6/30/2022),下一个日期是7/13/2022,遵循14天的序列,因为如果您这样做mod(日期(6/15/2022,7/13/2022,“ d”),14),您将获得零。

更多示例

Start Date: 6/15/2022
Today's Date: 6/30/2022
Next Needed Date: 7/13/2022

Today's Date: 7/14/2022
Next Needed Date: 7/27/2022

我只想显示下一个日期,因此我不想使用sequence()或transpose()来填充多个行/列。

任何建议都会有所帮助,谢谢。

I am trying to get bi-weekly dates based on a start date that would then provide the next upcoming date following the 14-day sequence from the start date, to get me the date that comes after today's date.

For example, if the start date is 6/15/2022, I would want the date every 14 days, and using today's date, I want to get the immediate next date that would still follow the 14-day sequence. Using today's date (6/30/2022), the next date I should get is 7/13/2022, which follows the 14-day sequence, since if you do MOD(DateDif(6/15/2022, 7/13/2022, "D"),14), you will get zero.

More Examples

Start Date: 6/15/2022
Today's Date: 6/30/2022
Next Needed Date: 7/13/2022

Today's Date: 7/14/2022
Next Needed Date: 7/27/2022

I only want to show the single next date, so I do not want to use sequence() or transpose() to fill up multiple rows/columns.

Any suggestions would be helpful, thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

和影子一齐双人舞 2025-02-18 23:42:50

尝试:

=B1+(14*ROUNDUP((TODAY()-B1)/14))

try:

=B1+(14*ROUNDUP((TODAY()-B1)/14))

enter image description here

只是在用心讲痛 2025-02-18 23:42:50

您可以使用序列为此:

sstatic.net/faoiwgvo.png“ rel =“ nofollow noreferrer”>

=SEQUENCE(4,1,B1,14)

然后使用床单菜单>格式>数字>日期

公式分解:
•4行/结果(或多或少)
•1列(如果需要的话,请使用更多列)
•B1,就像从B1中的值开始(在技术上只是数字)
•14天间隔

You can use Sequence for that:

Example Sheet

The formula in B3:

=SEQUENCE(4,1,B1,14)

Then use Sheets Menu > Format > Number > Date

Formula Breakdown:
• 4 rows/results (ask for more or less)
• 1 column (more columns if you need it)
• B1, as in start with value in B1 (which is just a number technically)
• 14 day intervals

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文