Dates are everywhere in data, but knowing how to work with them is something that took me a while to wrap my head around. With so many functions, it's easy to get them mixed up when you're first starting out. So, I've put together a guide to some of the most useful Tableau date functions, breaking down what they do and when to use them!

  1. Getting the Date

TODAY() Returns the current date. Example: If today is 30th November 2026, the result is 30/11/2026.

NOW() Returns the current date and time. Example: 30/11/2026 16:00.

  1. Extracting Information from Dates

DATEPART() Extracts a specific numerical part of a date. Example: if you want to identify which month each claim was made in, the calculation would be:

DATEPART ('month', (claim date))

If the claim date is 15/03/2026, the output would be 3.

DATENAME() Returns the name of a date part. Example: if you want to display the name of the month rather than the number:

DATENAME ('month', (claim date))

If the claim date is 15/03/2026, the output would be March

  1. Changing Dates

DATEADD() Adds or subtracts a specified amount of time from a date. Example: You want to calculate a date 30 days after a claim was made.

DATEADD('day', 30, [claim date])

If the claim date is 15/03/2026, the result is 14/04/2026

You can also subtract time: DATEADD('month', -1, [claim date])

DATETRUNC() Takes a date and moves it back to the beginning of a specified period. Example: You want to group all claims into months, regardless of which day they occurred

DATETRUNC('month', [Claim Date])

If the claim date is 15/03/2026, the result is 01/03/2026

Other examples are:

  • 'Year' = 01/01/2026
  • 'Quarter' = 01/01/2026 (for Q1)

  1. Comparing Dates

DATEDIFF() Calculates the difference between two dates in a specified unit. Example: You want to find out how many days passed between a customer taking out their policy and making their initial claim.

DATEDIFF('day', [Policy Start Date], [Claim Date])

If the policy started on 01/03/2026 and the claim was made on 15/03/2026, the result is 14