Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to calculate next weekday date?

Featured Replies

I have a problem where I need to calculate to the next date of a particular weekday. Let say:

Start_Date = Monday, 8th December 2008

Period= 4 Weeks

Calc_End_Date = Must be the weekday of the Start_Date in a Period of 4 weeks (=5th of January '09)

If I use the Date Function, Day (Start_date + 28), it doesn't work always because it calculates the day not the weekday.

How do I calculate the weekdays if I want to use the Date function?

Thanks

If I use the Date Function, Day (Start_date + 28), it doesn't work always because it calculates the day not the weekday.

It's not quite clear what you're doing there. Day (Start_date + 28) will give you the day-of-the-month of the target day, i.e. 5 using your example (Jan 5, 2009). If you do the same for the month and the year, you should get the correct result at the end.

However, it's quite unnecessary to use the Date() function for this:

Start_Date + 7 * Period

should do the job.

  • Author

Sorry if it wasn't clear,

Here my situation:

I need to calculate when a contract is finished. I have a start date and a period. The end date must fall on the same weekday as the start weekday. So, I need to calculate Weekday times period (4 Weeks = 28 days). For me its not clear what to use to get the right result.

If the period is given as number of weeks then:

Start_Date + 7 * Period

will always be the same day-of-week as Start_Date (unless Period is a fraction...).

  • Author

I will test this tomorrow.

Thank you for your help.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.