Date Function To Do This?

# Thread: Date Function To Do This?

1. Senior Member
Join Date
Dec 1969
Posts
667

## Date Function To Do This?

Say I have I know that I want to display the 3 Tuesday of the current month. How can VBS figure that out dynamically?<BR><BR>Any ideas?<BR><BR>Thanks dudes.

2. Senior Member
Join Date
Dec 1969
Posts
667

## GOTS IT

Response.Write WeekdayName(Day("1/4/2001"))<BR><BR><BR>I freakin&#039; rock!

3. Dan
Senior Member
Join Date
Dec 1969
Posts
1,364

## RE: Date Function To Do This?

Try This might be lengthy but works.<BR><BR>curr_mm = Month(Date)<BR>curr_yy = Year(Date)<BR>first_day_month = Weekday(curr_mm & "/1/" & curr_yy)<BR><BR>mod_first_day_month = (first_day_month - 1)<BR>Select Case mod_first_day_month<BR> Case 0, 1, 2<BR> ThirdTue = ((3 - mod_first_day_month) + 14)<BR> Case 3, 4, 5, 6<BR> ThirdTue = ((3 - mod_first_day_month) + 21)<BR>End Select<BR>&#039;3rd Tuesday date = curr_mm & "/" & ThirdTue & "/" & "curr_yy"<BR>

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•