# Sum

The sum updater class performs a mathematical calculation based on a left-hand side and a right-hand side, both of which can contain any number of sub elements. In addition to the left and right parts of the calculation, a mathematical operator must be provided.

<version>
<major></major>
<minor></minor>
<build>
<sum operator="divide">
<left>
<time-since date="midnight" unit="seconds" />
</left>
<right><fixed value="2" /></right>
</sum>
</build>
<revision></revision>
</version>

The example shown above will take the number of seconds since midnight and divide it by two. The resulting value will be the build component of the version number. This is the same calculation that Visual Studio uses to automate revision numbers.

## Operators

Operator |
Description |

**add** |
Uses the addition operator to add the two values together. |

**subtract** |
Uses the subtraction operator to subtract one value from the other. |

**multiply** |
Uses the multiplication operator to multiply one value by the other. |

**divide** |
Uses the division operator to divide one value by the other. |