Select Date-Format Variables to Subtract

  1. Select the variables to subtract.
  2. Select the unit for the result from the drop-down list.
  3. Select how the result should be calculated (Result Treatment).

Result Treatment

The following options are available for how the result is calculated:

  • Truncate to integer. Any fractional portion of the result is ignored. For example, subtracting 10/28/2006 from 10/21/2007 returns a result of 0 for years and 11 for months.
  • Round to integer. The result is rounded to the closest integer. For example, subtracting 10/28/2006 from 10/21/2007 returns a result of 1 for years and 12 for months.
  • Retain fractional part. The complete value is retained; no rounding or truncation is applied. For example, subtracting 10/28/2006 from 10/21/2007 returns a result of 0.98 for years and 11.76 for months.

For rounding and fractional retention, the result for years is based on average number of days in a year (365.25), and the result for months is based on the average number of days in a month (30.4375). For example, subtracting 2/1/2007 from 3/1/2007 (m/d/y format) returns a fractional result of 0.92 months, whereas subtracting 3/1/2007 from 2/1/2007 returns a fractional difference of 1.02 months. This also affects values calculated on time spans that include leap years. For example, subtracting 2/1/2008 from 3/1/2008 returns a fractional difference of 0.95 months, compared to 0.92 for the same time span in a non-leap year.

Table 1. Date difference for years
Date 1 Date 2 Truncate Round Fraction
10/21/2006 10/28/2007 1 1 1.02
10/28/2006 10/21/2007 0 1 .98
2/1/2007 3/1/2007 0 0 .08
2/1/2008 3/1/2008 0 0 .08
3/1/2007 4/1/2007 0 0 .08
4/1/2007 5/1/2007 0 0 .08
Table 2. Date difference for months
Date 1 Date 2 Truncate Round Fraction
10/21/2006 10/28/2007 12 12 12.22
10/28/2006 10/21/2007 11 12 11.76
2/1/2007 3/1/2007 1 1 .92
2/1/2008 3/1/2008 1 1 .95
3/1/2007 4/1/2007 1 1 1.02
4/1/2007 5/1/2007 1 1 .99