How to use Date functions in Tableau
Today we’ll be learning how to use different Date functions in Tableau. This tutorial will help to understand and use of Date functions and Properties .
Change Fiscal year start month and Week start day
In Tableau we have the option to change the start of week and fiscal year month. For that right click on the data and select Date Properties option. Then a date properties window will appear to change the values.
Date Functions
DATEPART function returns datepart as integer as shown in the image below.
DATENAME function returns datepart as string as shown in the image below.
DATEDIFF function returns difference between two dates. The difference depends on the date part itcan be day,month,quarter etc. shown in the image below.
MAKEDATE returns the date. The format MAKEDATE(year, month, day).
Few other functions-
NOW() – Returns current date and time
TODAY() – Returns current date.
Month(#10-12-2016#) – Returns Month (as 12)
Year(#10-12-2016#) – Returns Year (as 2016)
DAY(#10-12-2016#) -Returns Day (as 10)
Thanks for Reading!
So this tutorial will give you an idea of how to use date functions in Tableau. Comments your suggestions and doubts. Keep visiting Analytics tuts for more analytics tutorials.