简体   繁体   English

如何通过传递当天的日期来获取星期几(星期一)的日期?

[英]How to get the date for the start of the week (Monday) by passing in the current day?

I would like to get the date for the start of the week (start of the week is the Monday) given the current date. 我想获得给定当前日期的一周的开始日期(一周的开始是星期一)。 So for eg if today is 27-Mar-18, then the formula should return 26-Mar-18. 因此,例如,如果今天是18年3月27日,则该公式应返回18年3月26日。 If today is 31-Mar-18, then the formula should still give me 26-Mar-18. 如果今天是18年3月31日,那么该公式仍然应该给我18年3月26日。 If the current date was 24-Mar-18, the formula should return 19-Mar-18. 如果当前日期为18年3月24日,则公式应返回18年3月19日。

How would I achieve this? 我将如何实现?

Thanks. 谢谢。

尝试使用此公式来计算A2中的日期,

=A2-WEEKDAY(A2, 2)+1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Excel - 将周日开始日期作为公式 - Excel - Get Week Day Start Date as formula 如何在给定任何日期并假设星期一为 Excel 中的第一天的情况下找到一周中第一天的日期 - How do I find the date of the first day of week given any date and assuming Monday as day 1 in Excel 如何获取给定日期的一个月中每个星期一的日期 - How to get the day of every Monday in a month for a given date Excel-如何获取日期是否为星期几? - Excel - how to get if a date is a specific day of the week? 如何获取“最多”一周的当前日期显示的Excel图形 - How to get an Excel graph show “up to” current day of week 在PowerQuery M中获取日期范围(开始日期,结束日期)和年份中星期几的日期 - Get dates from day of week in a date range (start date, end date) and year in PowerQuery M 如何获取任何给定日期的一周的最后一个工作日 - How to get the Last working day of the Week for any Given date 您如何从每周的星期一开始为图表制作刻度线? - How do you make ticklabels for chart start with the Monday of each week? 每周星期一的获取日期 - Getting Date of Monday of each week Excel VBA-是否可以仅指定日期名称来获取当前星期的日期? - Excel VBA - Is there a way to get the date in the current week, given only the day name?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM