计算上一周和本周的开始和结束日期 [英] Calculate start and end date of previous and of current week
本文介绍了计算上一周和本周的开始和结束日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
我设计了一个高级搜索屏幕.我有一个单选按钮上周"和一个本周"和本月",用于根据文档的日期进行搜索.如何使用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://stackoverflow.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
这篇关于计算上一周和本周的开始和结束日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文