### Last4WeeksToSun

Basic and Crystal syntax.

##### Returns

None

##### Action

Specifies a range of dates that includes the four weeks previous to last Sunday. A week begins on a Monday and ends on a Sunday. For example, September, 1996, begins on a Sunday.

- If today is September 22 (Sunday), Last4WeeksToSun begins on August 26 (Monday) and ends on September 22 (today, Sunday).
- If today is September 28 (a Saturday), Last4WeeksToSun begins on August 26 (a Monday) and ends on September 22 (the previous Sunday).

##### Examples

The following examples are applicable to Crystal syntax:

If {orders.ORDER DATE} in Last4WeeksToSun Then
{orders.ORDER AMOUNT}
Else
0

Returns the Amount if the date falls within the last 4 weeks to Sunday (See Action section for specifics). The following table identifies the first and last dates included in the date range if today equals 04/10/95 (Monday).

If today = 04/10/95 | {orders. ORDER DATE} | {orders. ORDER AMOUNT}
not in range | 03/12/95 | 0
first date included | 03/13/95 | 1252.24
| 03/27/95 | 1597.87
| 04/05/95 | 2546.35
last date included (Sunday before current date) | 04/09/95 | 5462.21

Note: If you would like to base the date range on a date other than today's date, you must either change the date via the Date/Time option in the Windows Control Panel, or change the report print date via the Set Print Date/Time command in the Report Menu.

Seagate Software, Inc. http://www.seagatesoftware.com Please send comments to: techpubs@seagatesoftware.com