ENDOFLASTYEAR

Returns the end date of the previous year treating the system date as current date. The time returned is 11:59:59 PM.

Syntax

= ENDOFLASTYEAR()

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

= ENDOFLASTYEAR()

As SYSTEM date is 1/28/2010, 12/31/2009 11:59:59 PM

= ENDOFLASTYEAR().Year

The previous year.

= ENDOFLASTYEAR().AddDays(1)

The start date of current year.

= ENDOFLASTYEAR().AddDays(1).Year

The current year.

Reference

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