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 |