Part 1
Dim totdays as long
totdays = DateDiff("d", "01/2011", DateAdd("m", 1, "01/2011"))
The above code will return “31”
I want to get the days for that 31
Expected Output
Monday (31/01/2011)
Need VB6 Code Help
Part 2
I want to find the sundays on the particular month….
For Example, If i select the month 01/2012, The query should give the result like this
01
08
15
22
29
The above dates are sunday.
Expected Output for 01/2012 Month
01
08
15
22
29
something like this (tested in vba)
final update for the Sunday sub-query
As per request in commentd from Gopal below
updated
Note that I needed to use
lngdays-1to add 1 day less than a month (ie 31-Jan-2011), else you would have had 01-Feb-2011 as the resultold