How do I compare dates in table calcs?

Knowledge Drop

Last tested: June 2020

There are two methods for date comparison in table calcs.

  1. Use diff_days or any of the other diff_ functions (docs).
    For example, to say "${date_a} > $[date_b}", just do diff_days(${date_b},${date_a}) > 0.

  2. The extract_ familiy of functions can be useful since they let you extract a numeric value (year, month, day, etc) from a date or timestamp. Docs on that.
    If you need something simple like "date is after January 1, 2017", then just do extract_years(${date}) > 2017.

This content is subject to limited support.                

Version history
Last update:
‎04-05-2021 09:09 AM
Updated by: