2nd sunday of every month

# Thread: 2nd sunday of every month

1. uc
Member
Join Date
Dec 1969
Posts
63

## 2nd sunday of every month

inputs:<BR>startdate:01-mar-90<BR>startdate:01-mar-91<BR>day: sunday<BR>occurance: 2nd (could be first sunday or last sunday too )<BR><BR>find all the 2nd sundays(dates) in every month between the start and end dates<BR><BR>Output:<BR>11-jan-90<BR>08-jan-90<BR>13-jan-90<BR>10-jan-90<BR>.<BR>.<BR>.<BR>....etc<BR>Thanx in anticipation

2. Senior Member
Join Date
Dec 1969
Posts
136

## RE: 2nd sunday of every month

What are you asking here? Do you need help with SQL?

3. uc
Member
Join Date
Dec 1969
Posts
63

## RE: 2nd sunday of every month

emma,<BR>sql or asp.<BR>

4. Senior Member
Join Date
Dec 1969
Posts
1,424

## Are you even making an effort?

Do you know how to find the first Sunday in a month?<BR>Do you know how to find the first Day in a month?<BR><BR>In your *hard-coded* sample that you provided in your question, you ask: "find all the 2nd sundays(dates) in every month between the start and end dates"<BR><BR><BR>Then you provide the following start and end date&#039;s (well you&#039;ve given 2 start date&#039;s actually):<BR> startdate:01-mar-90<BR> startdate:01-mar-91<BR><BR>I presume that the second of those two inputs should be an *enddate*, eh?<BR><BR>Then, you give us some sample output:<BR><BR>&#060;snip&#062;<BR> Output:<BR> 11-jan-90<BR> 08-jan-90<BR> 13-jan-90<BR> 10-jan-90<BR>&#060;/snip&#062;<BR><BR>Is that the results that you&#039;d expect to see from your sample inputs?<BR><BR>If not, why not take the time to, at least, show us what you&#039;d expect to see if the results were accurate?<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>< BR>

5. Senior Member
Join Date
Dec 1969
Posts
404

## Study what Bill & I gave you

Look, uc, you&#039;re close. But its up to you now to close the door!!!!!

6. Senior Member
Join Date
Dec 1969
Posts
136

## RE: 2nd sunday of every month

Try a for.. next loop and step2 <BR><BR>You need a VBScript book I think (one with lots of code examples).<BR><BR>Don&#039;t have time to write your recordsets and code but there are loads of sites out there that can help.

7. uc
Member
Join Date
Dec 1969
Posts
63