prevMth Function

Retrieves the date in the previous month that corresponds most closely to a specified date.


date prevMth(date date)

Parameter

Description

date

The date to match in the previous month.

The closest match to date that is found in the previous month.

// Returns the date 29/02/1996 (leap year).
prevMth(31\03\1996);
 
// Returns the date 28/01/1998.
prevMth(29\02\1998);

Community Additions

ADD
Show: