STARTOFLASTMONTH

Returns the start date of the previous month treating the system date as current date. The time returned is 12:00:00 AM.

Syntax

= STARTOFLASTMONTH()

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

= STARTOFLASTMONTH()

As SYSTEM date is 1/28/2010, 12/1/2009 12:00:00 AM.

= STARTOFLASTMONTH().Month

The last month.

= STARTOFLASTMONTH().AddMonths(-1)

The start date 2 months before the current month.

= STARTOFLASTMONTH().AddMonths(-1). Month

The month 2 months before the current month.

Reference

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