Week Ending Date
No attachments for this post
Returns the date of the week-ending day based on the input date. Useful for due-by dates, weekly accounts etc.
Original Author: Joe McDonnell
A date, or use date() for the current date.
The number of the week-ending day (Sun=1 ... Sat=7).
This function accepts the input date and the weekending day (Sun=1.....Sat=7).
If the weekday of the input date is the same as the weekending day it returns the input date
Function weekendday(inputdate, day)
If Weekday(inputdate) > day Then
inputdate = inputdate + 7
weekendday = inputdate + (day - Weekday(inputdate))
Comments on this post
No comments have been added for this post.
You must be logged in to make a comment.