DATE FIELDS
There are several interesting date functions in Tableau, but first let's look at how Tableau breaks down dates.
Date Parts
Individual elements of a date, such as the month and year, can be referenced by date functions with the string argument date_part
(see Table 4.1). It can be useful to have some familiarity with these options, because many different date functions require you to specify exactly which part of the date is affected by the calculation in question.
Table 4.1 The date parts used in Tableau.
Date part | Meaning | Permissible values |
'second'
|
Seconds |
0 –59
|
'minute'
|
Minutes |
0 –59
|
'hour'
|
Hours |
0 –23 or 1am , 12pm , etc. |
'day'
|
Days |
1 –31
|
'weekday'
|
Weekdays |
1 –7 or Monday , Tuesday , etc. |
'iso‐weekday'
|
Weekdays according to the ISO 8601 standard |
1 –7 or Monday , Tuesday , etc. |
'week'
|
Week numbers |
1 –52
| ...