148k views
1 vote
Which of the following functions can be used to determine the next occurrence of a specific day of the week after a given date?

A) NEXTDAY
B) DAYAFTER
C) AFTERDAY
D) FOLLOWINGDAY

User Xero
by
7.7k points

1 Answer

6 votes

Final answer:

The correct function to determine the next occurrence of a specific day of the week after a given date is the DATEADD function.

Step-by-step explanation:

The correct function to determine the next occurrence of a specific day of the week after a given date is the DATEADD function. This function allows you to add a certain number of days to a given date. In this case, you can add a certain number of days until you reach the desired day of the week.

For example, if you want to find the next occurrence of Thursday after a given date, you can use the following formula:

DATEADD('day', (7 - DATEPART('weekday', given_date)) % 7 + 1, given_date)

This formula calculates the number of days needed to reach the next Thursday and adds it to the given date.

User NilMoBile
by
8.3k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.