How do I get the date of a Sunday in any particula

# Thread: How do I get the date of a Sunday in any particula

1. Junior Member
Join Date
Dec 1969
Posts
2

## How do I get the date of a Sunday in any particula

Hello all! This may sound like an easy one and maybe I am just not getting it...<BR><BR>I need a routine that will return the actual date of the Sunday of any given week-of-the-year.<BR><BR>I already know how to get the week of the year with the following statement:<BR><BR>WeekOfYear = DatePart("ww", Now)<BR><BR><BR>Any help anyone can offer is greatly appreciated!<BR><BR>Steve

2. Senior Member
Join Date
Dec 1969
Posts
96,118

## Date() - WeekDay( Date() )

Or:<BR><BR>anyDate = ...<BR>sundayOfThatWeek = anyDate - WeekDay( anyDate )<BR><BR>Or:<BR><BR>Find Sunday for Jan 1 of a year (using above) and then keep adding 7 to the date to get successive Sundays.<BR>

3. Junior Member
Join Date
Dec 1969
Posts
2

## RE: Date() - WeekDay( Date() )

Bill:<BR><BR>Thank you mucho! Your code actually gave me Saturday but I just added a "+ 1" to the tail end of it to give me Sunday.<BR><BR>You have no idea how much time you just saved me.<BR><BR>Steve

4. Senior Member
Join Date
Dec 1969
Posts
96,118

## Oops...you are right...

Do. I keep thinking that WeekDay(someSunday) is 0, but it is of course 1. <BR><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
•