date(a) - months(b)

Prev Next

This function subtracts b months from the given date a. If b is negative the number of months are added.

Parameters

Parameter

Description

a

Date.

b

Months.

Examples

Parameter a

Parameter b

Result

2005-01-01

1

2004-12-01

2005-01-01

-1

2005-02-01