difference in years

This block is part of the date group and was last modified in core v13.0.7.

difference in years v13.0.7

The difference between 2 given dates in years.

In pins 2
  • 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.

Out pins 2
  • 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 years: date now feeds the date_1 pin; the number out pin feeds cast to value.

Studio canvas example for the difference in years block: typical wiring for difference in years.

Version history

Introduced in v13.0.7.


Back to date Return to the main group to view all sub-groups Back to date Return to the group to view all blocks within this group