LastDayOfWeek(Date date)

Returns the date corresponding to the last day of the week containing the given date.

Parameters

date
The date to check.

Returns

Date

Remarks

This function returns the date corresponding to the last day of the week according to the database location settings. In the United States, Canada, Japan, and some other countries, it’s the Sunday following the given date; in much of the Middle East, it’s Saturday; and for the rest of the world, it’s the Sunday preceding the given date.

Examples