我想按天查找每个月的总天数。
例如
月份是'01/2011'
(mm/yyyy)
Expected Output
Sunday - 5
Monday - 5
Tuesday - 5
Wednesday - 4
Thursday - 4
Friday - 4
Saturday - 4
尝试过的代码
Dim lngCnt As Long
Dim strOut As String
dtStart = DateValue('01/2012')
dtEnd = DateAdd("d", DateDiff("d", '01/2012', DateAdd("m", 1, '01/2012') - 1), dtStart)
lngCnt = Weekday(dtStart) - 3
Do
lngCnt = lngCnt + 3
strOut = strOut & Format(lngCnt, "00") & ","
Loop While lngCnt + 3 <= dtEnd - dtStart
上面的代码将给出结果为Wednesday = 4, 11, 18, 25
wednesday = 4
但我想要这样的总数
如何在vb6中完成
需要 VB6 代码帮助