计算上一周和本周的开始和结束日期

问题描述:


我设计了一个高级搜索屏幕.我有一个单选按钮上周"和一个本周"和本月",用于根据文档的日期进行搜索.如何使用C#计算上周和本周的开始结束结束日期.

Hi
I have designed a advanced Search Screen . I have radio one button "Last Week" and one "This week" and "This month" for doing a search based of the date of the documents. How can I calculate the start end end date of last weeek and this week using C#.

Thanks in advance!

在此处查找上一周的代码: ^ ].了解了它的工作原理后,您可以轻松地弄清楚当前一周的操作方法.

干杯!

-MRB
Find the code for the previous week here: http://*.com/questions/658353/calculate-previous-weeks-start-and-end-date[^]. Once you''ve understood how it works you can easily figure out how to do it for the current week.

Cheers!

-MRB