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

# difference in weeks

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).

Difference between 2 given dates in weeks.

- 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 weeks](https://docs.rual.nl/block-types/date/date_differenceweeks): [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 weeks block: typical wiring for difference in weeks.](https://docs.rual.nl/canvas-examples/date_differenceweeks.png)

### Version history

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