Finding the First Date of a Week

Question:
If I have the number of a given week of a year, how can I get the date of the first day of that week? For example, I want the date of Sunday of the 5th week in 1999.

Answer:
There’s not a built-in function that can do all the work for you on this one. However, you can do this:

  1. The first day of the year is always January 1st. (duh, right?) That will fall on some day of the week, which you can determine by using the Weekday function. Weekday will return you a number from 1 to 7 indicating what day of the week that date is.
  2. If you want to go to the beginning of the 5th week, you need to add (4 x 7) days to January 1st. The DateAdd function can do this and return you the date that the fifth week of the year starts on.
  3. Once you have that date, you can simply check the Weekday value of it to determine how many more days until you hit Sunday.
Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

The Latest

microsoft careers

Top Careers at Microsoft

Microsoft has gained its position as one of the top companies in the world, and Microsoft careers are flourishing. This multinational company is efficiently developing popular software and computers with other consumer electronics. It is a dream come true for so many people to acquire a high paid, high-prestige job

your company's audio

4 Areas of Your Company Where Your Audio Really Matters

Your company probably relies on audio more than you realize. Whether you’re creating a spoken text message to a colleague or giving a speech, you want your audio to shine. Otherwise, you could cause avoidable friction points and potentially hurt your brand reputation. For example, let’s say you create a

chrome os developer mode

How to Turn on Chrome OS Developer Mode

Google’s Chrome OS is a popular operating system that is widely used on Chromebooks and other devices. While it is designed to be simple and user-friendly, there are times when users may want to access additional features and functionality. One way to do this is by turning on Chrome OS