--- title: "date(a) - months(b)" slug: "date-substract-month" updated: 2026-08-13T08:04:27Z published: 2026-08-13T08:04:27Z canonical: "docs.lobstersoftware.com/date-substract-month" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # date(a) - months(b) 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 |