给定日期,如何查找周,月和年的开始日期和结束日期
问题描述:
我有一个日期(格式为10/5/2011),我将如何查找该周的开始日期和结束日期,以及该月和年份的开始日期和结束日期.
任何帮助将不胜感激,
-G-
Hi,
i have a date(format 10/5/2011) how will i find the beginning date and end date of that week,and also beginning date and end date of that month and year.
any help would be appreciated,
-G-
答
引用该线程,将为您提供一个想法
http://stackoverflow.com/Questions/38039/how-can-i-get-the-datetime-for-the-the-start-of-the-week-week- [ ^ ]
Refer this thread, will give you an idea
http://stackoverflow.com/questions/38039/how-can-i-get-the-datetime-for-the-start-of-the-week[^]
ASP.NET的答案是:获取当前星期的开始和结束日期 [ ^ ]
答案之一还包含月份和年份的代码.
ASP.NET has the answer: Get Current week starting and end date[^]
One of the answer also contains code for month and year.