谢谢。作者: chenghai 时间: 2003-9-10 23:42
1、转来一段代码(自己没用过),你看看:
Dim date1 As Date, date2 As Date, Weeks As Integer, tmpDate As Date
date1 = Me.txtDate1
date2 = Me.txtDate2
'日期相隔天数
Me.txtdates = date2 - date1 + 1
Weeks = 0
For tmpDate = date1 To date2
If Format(tmpDate, "aaaa") = "星期六" Or Format(tmpDate, "aaaa") = "星期日" Then
Weeks = Weeks + 1
End If
Next