ENDOFLASTWEEK

Returns the end date of the previous week. The time returned is 12:00 AM.

Syntax

= ENDOFLASTWEEK()

Parameters

None

Return Type

DateTime. The function returns a Microsoft .NET DateTime object.  Any properties or member functions of the DateTime object can also be accessed or used in formulas.

Examples

Example

Returns

= ENDOFLASTWEEK()

If SYSTEM date is 1/28/2010: 1/23/2010 12:00:00 AM.

= ENDOFLASTWEEK().Day

The day for end of the previous week.

= ENDOFLASTWEEK().AddDays(-7)

The date and time for the end of the week before previous week.

= ENDOFLASTWEEK().AddDays(-7).Day

The day for the end of the week before previous week.

Reference

http://msdn.microsoft.com/en-us/library/system.datetime_members(VS.71).aspx