2022 updates MS Excel - Data Cleaning Course Enroll now  
TableauTutorials

Tableau Date Functions

2 Mins read

Tableau is a self-service, highly recommended Business Intelligence, Data Analytics, and Visualization tool. It stands as a leader nine times consecutively in Gartner’s Magic Quadrant for BI and data analytics. In this tutorial, we learn some essential/useful Tableau Date Functions to manipulate date values in Tableau Dashboards.

What is Tableau Date Functions

The date functions are used to work with the data records in a Tableau Data Source. Date functions in Tableau are useful for various arithmetic and logical operations. To carry out these functions successfully it is necessary to know all the Date related functions in Tableau along with their working.

Date Functions in Tableau

The following are the Date functions in the tableau:

1. DAY

Syntax – DAY(Date)

If you want to know the day, then this function is used.

2. MONTH

Syntax – MONTH(Date)

If you want to know the month from the date given to Tableau, then this function is used.

3. YEAR

Syntax – YEAR(Date)

If you want to know the year of the date given to Tableau, then this function is used.

4. DATEDIFF

Syntax – DATEDIFF (depart, date1, date2, [start of the week(optional)])

If you want to know the difference between the input dates in Tableau, then this function is used.

5. DATEPART

Syntax – DATEPART (depart, date, [start of the week(optional)])

This syntax is helpful if you want to get the integer part of the date.

6. DATEADD

Syntax – Depart (depart, interval, date)

If you want to add a specific date to the existing date added to Tableau initially, the DATEADD function is used.

7. DATETRUNC

Syntax – DATETRUNC (depart, Date, [start of the week(optional)])

If you need to truncate the date or shorten or minus the date pre-provided to Tableau, the DATETRUNC function is used. It gives a new date as an output.

8. DATENAME

Syntax – DATENAME (depart, date, [start of the week(optional)])

If you need to know the date provided as an input to Tableau this function is used. It gives the output date in the form of a string.

9. MAKE DATE

Syntax – MAKE DATE (Year, Month, Day)

This function is used to create a visualization of the date when you input the required year, month, and date.

10. MAKE TIME

Syntax – MAKE TIME (Hour, Minute, Second)

This function provides the resultant date value with the help of provided hours, minutes, and seconds.

11. NOW

Syntax – NOW ()

If you want to know the present date and time provided to the Tableau, then this function will be used.

12. Today

Syntax – Today ()

When you use this function, you will get the current date as an output.

13. MAX

Syntax – (MAX (date1, date2))

This function is basically used for a comparison of numeric expressions. If you want to compare dates, this function is valid for dates as well. It returns the date value after comparing it. If the value after returning comes out as a null value, it is granted for this function.

14. MIN

Syntax – (MIN (date1, date 2))

This function is basically used for a comparison of numeric expressions. If you want to compare dates, this function is valid for dates as well. It returns the minimum date values after comparing. If the value after returning comes out as a null value, it is granted for this function.

15. YEAR

Syntax – YEAR (date)

This function gives the output as a year of the date and it is associated as a whole number.

16. TODAY

Syntax – TODAY ()

If you want to know the present date, this function is used.

Conclusions

In this blog, we discussed all the date functions used by Tableau. The date functions in Tableau are used for different functions associated with the date and time provided to Tableau. Some of the functions are valid for arithmetic functions as well as date functions and work according to the input provided in the syntax. If you want to learn to use these Tableau Date Functions then Join Our Latest Tableau Online Course & Become a pro in Tableau.

Related posts
AlteryxTutorials

Alteryx Hotkeys - Alteryx Keyboard Shortcuts

2 Mins read
Top 50+ Alteryx Shortcuts for Windows. Alteryx is popularly known as a Self-Service Analytics tool. Business users can build their data workflows…
AlteryxTutorials

Step By Step Guide to Learn Alteryx

6 Mins read
Alteryx Learning Path: The growth in technology has resulted in growth in understanding. In today’s world, humans – fellow businessmen know the…
Excel VBA CodeTutorials

VBA Code to Clean the Date Format

1 Mins read
When it is useful? Most of the time the most annoying problem is when the data is taken from ERP or other…