Tableau Date Functions

Why do we need to use date functions ?

  • allows you to manipulate the dates within your data.

Let's look at 'DATEADD' :allows you to add an interval to the given date.

DATEADD

In this example the month will be increase by 3, as that is the number place on the interval section of the function

'DATEDIFF': returns the difference between two dates so the start date is subtracted from the end date.

By dragging this calculated field into the 'Label' it will create a new column showing the difference between the order date and the ship date.

DATEDIFF EXAMPLE

'DATETRUNC': used to truncate the date specified in the formula.

DATETRUNC
DATETRUNC EX

As 'month' has been selected, all the dates in Order date of January will be truncated to January and all the order dates in February will be truncated to February and so on.  

Author:
Bridget Ama Boateng
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab