Number of Days in Month
- From: "brian b" <brianb@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 3 Jun 2005 07:40:21 -0700
I have the following code:
StartDate = (((Now() - Day(Now())) - Format(Now() - Day(Now()), "d")))
EndDate = (Now() - Day(Now()))
DayCount = 0
Do While StartDate < EndDate
Select Case WeekDay(StartDate)
Case Is = 1, 7
DayCount = DayCount
Case Is = 2, 3, 4, 5, 6
DayCount = DayCount + 1
End Select
StartDate = StartDate + 1
msgbox (DayCount & " " & StartDate)
Loop
Can someone tell me why May 2, 2005 would come back as 0 and how to fix?
Thanks
.
- Follow-Ups:
- Re: Number of Days in Month
- From: Tim Ferguson
- RE: Number of Days in Month
- From: Klatuu
- Re: Number of Days in Month
- Prev by Date: Re: nulls and date data type
- Next by Date: closing all forms except switchboard
- Previous by thread: Mail Merge to Word -Problem with Access Form Code...
- Next by thread: RE: Number of Days in Month
- Index(es):
Relevant Pages
|