Xbasic

Date_FirstDayOfPreviousMonth Function

Syntax

LastDate as D = date_FirstDayOfPreviousMonth([D date ])

Arguments

date

Optional. Default = today. The date to use when calculating the first day of the previous month.

Description

Returns the first day of the previous month for a given date. If no argument is supplied, returns last day of the previous month for the current date.

Discussion

The Date_FirstDayOfPreviousMonth() function returns the first day of the previous month.

Example

? Date_FirstDayOfPreviousMonth()
= {05/01/2006}
? Date_FirstDayOfPreviousMonth({7/4/06})
= {06/01/2006}

See Also