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 the addition of the date value a and the difference value.

See examples.

Parameters


Parameter

Description

a

Date.

b

Date.


Examples


Parameter a

Parameter b

Result

2010-01-01

2010-01-15

2010-01-15 00:00:00.0

Note: Date a - date b = -14 days. The absolute value of this is 14 days.

Date a (2010-01-01) + 14 days = 2010-01-15

2010-01-15

2010-01-01

2010-01-29 00:00:00.0

Note: Date a - date b = 14 days. The absolute value of this is 14 days.

Date a (2010-01-15) + 14 days = 2010-01-29

2010-01-01 12:34:56.123

2010-01-15 23:32:43.543

2010-01-15 23:32:43.543

2010-01-15 23:32:43.543

2010-01-01 12:34:56.123

2010-01-30 10:30:30.963