---
title: "difference in months · RUAL Documentation"
description: "The difference between 2 given dates in months."
canonical: https://docs.rual.nl/block-types/date/date_differencemonths
language: en
---

# difference in months

This block is part of the [`date`](https://docs.rual.nl/block-types/date) group and was last modified in core [`v13.0.7`](https://docs.rual.nl/core-versions/130007).

The difference between 2 given dates in months.

- base date `date` Default `now`

- compare to required `date` Will be compared to the base date. If this pin is later than the base date a positive number will be returned.

- rounded diff `number`

- exact diff `number` Will return the exact difference with an accuracy of 3 digits after the comma.

A typical wiring for [difference in months](https://docs.rual.nl/block-types/date/date_differencemonths): [date now](https://docs.rual.nl/block-types/date/date_currentdate) feeds the `date_1` pin; the `number` out pin feeds [cast to value](https://docs.rual.nl/block-types/type%20casting/number_convert_to_value).

![Studio canvas example for the difference in months block: typical wiring for difference in months.](https://docs.rual.nl/canvas-examples/date_differencemonths.png)

### Version history

Introduced in [`v13.0.7`](https://docs.rual.nl/core-versions/130007).
