w = Weekday(CDate(Year(Date) & "-" & Month(Date) & "-1") + i - 1, vbMonday) - 1求什么意思!

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/23 20:14:52
w=Weekday(CDate(Year(Date)&"-"&Month(Date)&"-1")+i-1,vbMonday)-1求什么意思!w=Weekday(CDate(Year(Date)&"-"

w = Weekday(CDate(Year(Date) & "-" & Month(Date) & "-1") + i - 1, vbMonday) - 1求什么意思!
w = Weekday(CDate(Year(Date) & "-" & Month(Date) & "-1") + i - 1, vbMonday) - 1
求什么意思!

w = Weekday(CDate(Year(Date) & "-" & Month(Date) & "-1") + i - 1, vbMonday) - 1求什么意思!
w = Weekday(CDate(Year(Date) & "-" & Month(Date) & "-1") + i - 1,vbMonday) - 1
Date是当前的日期,
Year(Date)是现在的年份,Month(Date)是现在的月份;
Year(Date) & "-" & Month(Date) & "-1"就是yyyy-mm-dd格式表示的今年本月第一天
CDate(…………)在把这天转换成日期类型
然后因为不知道你的i是什么意思,…….但总之还是换成出另一个相关的日期
最后,Weekday(…………)-1,就是去的前面算取的日期的星期几了.