--- title: "date(a) - days(b)" slug: "date-substract-day" updated: 2026-08-13T08:02:57Z published: 2026-08-13T08:02:57Z canonical: "docs.lobstersoftware.com/date-substract-day" --- > ## 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) - days(b) This function subtracts **b** days from the given date **a**. If **b** is negative the number of days are added. ## Parameters | Parameter | Description | | --- | --- | | a | Date. | | b | Days to subtract. | ## Examples | Parameter a | Parameter b | Result | | --- | --- | --- | | 2005-01-01 | 1 | 2004-12-31 | | 2005-01-01 | -1 | 2005-01-02 |