Format Dates Using ISO-8601 Weeks and Years

For many European locales (listed below), Tableau allows you to format dates using ISO-8601 weeks and years.

Expand to see European locales that support ISO-8601 in Tableau

da-DK, Danish (Denmark)

se-SE, Sami, Northern (Sweden)

rm-CH, Romansh (Switzerland)

sms-FI, Sami, Skolt (Finland)

is-IS, Icelandic (Iceland)

de-DE, German (Germany)

km-KH, Khmer (Cambodia)

nl-NL, Dutch (Netherlands)

smj-SE, Sami, Lule (Sweden)

fi-FI, Finnish (Finland)

nn-NO, Norwegian Nynorsk (Norway)

it-IT, Italian (Italy)

it-CH, Italian (Switzerland)

nb-NO, Norwegian Bokmål (Norway)

pl-PL, Polish (Poland)

sv-SE, Swedish (Sweden)

et-EE, Estonian (Estonia)

lv-LV, Latvian (Latvia)

hsb-DE, Upper Sorbian (Germany)

kl-GL, Greenlandic (Greenland)

mk-MK, Macedonian (North Macedonia)

fo-FO, Faroese (Faroe Islands)

se-NO, Sami, Northern (Norway)

as-IN, Assamese (India)

fy-NL, Frisian (Netherlands)

se-FI, Sami, Northern (Finland)

ps-AF, Pashto (Afghanistan)

prs-AF, Dari (Afghanistan)

de-CH, German (Switzerland)

sv-FI, Swedish (Finland)

dsb-DE, Lower Sorbian (Germany)

de-LU, German (Luxembourg)

fr-CH, French (Switzerland)

smj-NO, Sami, Lule (Norway)

de-LI, German (Liechtenstein)

sma-NO, Sami, Southern (Norway)

sma-SE, Sami, Southern (Sweden)

smn-FI, Sami, Inari (Finland)

 

The week and year numbering in an ISO-8601 calendar is different from a standard Gregorian calendar. Here’s how January 2nd, 2011 would be represented:

Calendar System Week Number Year Number
Standard Gregorian 1 2011
ISO-8601 52 2010

When formatting dates, it’s important to ensure that your month, week and year numbers all come from the same calendar system. Otherwise, the date might not make sense. There are two ways to do this:

  • Let Tableau guess which calendar system you want to use for each placeholder. For example, if you type mm yyyy (a month followed by a year), Tableau uses the standard Gregorian year. In this case, it makes sense to use that year with a month number.
  • In your format string, place an annotation after each week (ww) or year (yyyy) placeholder, to indicate what kind of placeholder it should be:

    Annotation Calendar to Use Example Format String
    [Y] ISO-8601 ww[Y] yyyy[Y]
    [y] Standard Gregorian ww[y] yyyy[y]

Important: To get correct ISO-8601 week numbering, your computer's location must be set to one of the above locales, and you must set your data source start of week to Monday. (For information on how to do this, see Date Properties for a Data Source.)

Otherwise, Tableau will number weeks using your data source start of week setting, which may result in partial weeks at the beginning and end of years being created.

Note: ISO week numbering will not occur if you are using a fiscal year that doesn’t start in January, regardless of the locale you choose.

Sample format strings for the date December 31, 2013

Here are sample format strings for the date December 31, 2013, where m stands for a month or day-of-month placeholder. Time placeholders, such as hours, minutes, and seconds, don’t influence whether or not a year is week-based or year-based.

Format string Formatted output
yyyy 2013
yyyy[Y] 2014
yyyy ww 2014 1
yyyy mm 2013 12
ww yyyy 1 2014
mm yyyy 12 2013
ww yyyy[y] 1 2013
mm yyyy[Y] 12 2014
yyyy mm ww 2013 12 1
mm yyyy ww 12 2013 1
ww mm yyyy 1 12 2013
ww mm yyyy[Y] 1 12 2014
ww yyyy mm 1 2014 12 (format is ambiguous)
ww yyyy[y] mm 1 2013 12
ww yyyy mm yyyy 1 2014 12 2013
ww yyyy yyyy mm 1 2014 2013 12
yyyy mm ww yyyy 2013 12 1 2014
Thanks for your feedback!Your feedback has been successfully submitted. Thank you!