--- title: "date(a) - date(b)" slug: "date-substract" updated: 2026-08-13T07:59:57Z published: 2026-08-13T07:59:57Z canonical: "docs.lobstersoftware.com/date-substract" --- > ## 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) - date(b) This function first calculates the absolute difference between the date values **a** and **b**. The result of the function is the date that results from date value **a** and the subtracted difference value. See examples. ## Parameters | Parameter | Description | | --- | --- | | a | Date. | | b | Date. | ## Examples | Parameter a | Parameter b | Result | | --- | --- | --- | | 2010-01-12 | 2010-01-15 | *2010-01-09 00:00:00.0* **NOTE:** Date **a** - date **b** = -3 days. The absolute value of this is 3 days. Date **a** (*2010-01-12*) - 3 days = *2010-01-09* | | 2010-01-15 | 2010-01-12 | *2010-01-12 00:00:00.0* **NOTE:** Date **a** - date **b** = 3 days. The absolute value of this is 3 days. Date **a** (*2010-01-15*) - 3 days = *2010-01-12* | | 2010-01-01 12:34:56.123 | 2010-01-15 23:32:43.543 | *2009-12-18 01:37:08.703* | | 2010-01-15 23:32:43.543 | 2010-01-01 12:34:56.123 | *2010-01-01 12:34:56.123* |