给定日期,如何查找周,月和年的开始日期和结束日期 [英] Given a date, how to find the beginning date and ending date of week,month and year

查看:71
本文介绍了给定日期,如何查找周,月和年的开始日期和结束日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个日期(格式为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.


这篇关于给定日期,如何查找周,月和年的开始日期和结束日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆