|
<>里面有的,搜索一下呀</P>
<>Function Rt_Day(BegDate As Variant) As Long <BR>Dim DateCnt As Variant<BR>Dim EndDays As Variant<BR>Dim IntDays As Integer<BR> DateCnt = CDate(Format(BegDate, "yyyy-m-1"))<BR> EndDays = DateAdd("d", -1, DateAdd("M", 1, DateCnt))<BR> IntDays = 0<BR> Do While DateCnt <= EndDays<BR> If Format(DateCnt, "ddd") = "Sun" Or _<BR> Format(DateCnt, "ddd") = "Sat" Then<BR> IntDays = IntDays + 1<BR> End If<BR> <BR> DateCnt = DateAdd("d", 1, DateCnt)<BR> Loop<BR> Rt_Day = IntDays<BR>End Function<BR></P> |
|