日期中的星期(与月份有关)
问题描述:
大家好,
我需要从我的日期范围中找到星期几和下一个日期.
例子:
从日期-2010年11月8日
迄今为止-2010年11月25日
我需要输出为
2 -因为2010年11月8日保留到11月的第二周
2010年11月8日2010年11月15日-2010年11月22日-因为这些是介于日期范围之间的天(星期一).
请帮帮我.
谢谢,
Karan
Hi all,
I need to find the week of the day and the subsequent date''s from my date range.
Example :
From date - 08-Nov-2010
To date - 25-Nov-2010
I need the output as
2 - because 08-Nov-2010 pretains to 2nd week of november
08-Nov-2010 15-Nov-2010 22-Nov-2010 - because these are the days (monday) which lie inbetween the date range.
Please help me.
Thanks,
Karan
答
好,一周是7天,所以如果日期是11月15日,则您处于第3周,因为15大于14.
这不是火箭科学.
Well, a week is seven days long, so if the date is 15 Nov, you''re in the 3rd week because 15 is greater than 14.
It ain''t rocket science.