YESTERDAY

Returns yesterday’s DateTime value treating the System Date value as today’s date and time as 12:00AM.

Syntax

= YESTERDAY()

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

= YESTERDAY()

In this case 1/27/2010 12:00:00 AM as the system date is 1/28/2010

= YESTERDAY().Day

Yesterday’s day.

= YESTERDAY().AddDays(-7)

The date, a week before yesterday

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

The day, a week before yesterday

Reference

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