李双军 发表于:2007-10-08 20:50:57
本月最后一日是周几
SELECT
Weekday(DateAdd("m",1,DateSerial(Year(Date()),Month(Date()),1)-1)) AS 本月最后一日是周几,
下月最后一日是周几
SELECT
Weekday(DateAdd("m",2,DateSerial(Year(Date()),Month(Date()),1)-1)) AS 下月最后一日是周几,
本月最后一个周5到月底的天数
SELECT
(Weekday(DateAdd("m",1,DateSerial(Year(Date()),Month(Date()),1)-1))+1) Mod 7 AS 本月最后一个周5到月底的天数;
下月最后一个周5到月底的天数
SELECT
(Weekday(DateAdd("m",2,DateSerial(Year(Date()),Month(Date()),1)-1))+1) Mod 7 AS 下月最后一个周5到月底的天数;
本月最后一个周5的日期
SELECT
DateAdd("m",1,DateSerial(Year(Date()),Month(Date()),1))-1-(Weekday(DateAdd("m",1,DateSerial(Year(Date()),Month(Date()),1)-1))+1) Mod 7 AS 本月最后一个周5的日期;
下月最后一个周5的日期
SELECT
DateAdd("m",2,DateSerial(Year(Date()),Month(Date()),1))-1-(Weekday(DateAdd("m",2,DateSerial(Year(Date()),Month(Date()),1)-1))+1) Mod 7 AS 下月最后一个周5的日期;