---
schema_version: "1"
id: f8bdf72afce12d61e0eb516ea680bef7a6bb27a115b5c95ee85319a356d333f2
title: Using Week-Based Placeholders in Custom Date Formats
collection: tableau
version: next
locale: en-us
portal_url: https://docs.salesforce.com/tableau/next/en-us/pro/desktop/dates_custom_date_formats_week.md
canonical_url: https://help.tableau.com/v0.0/pro/desktop/en-us/dates_custom_date_formats_week.htm
source_site: help.tableau.com
content_type: documentation
content_hash: ef329dbc8c1ba5b776cb20e463d8f7aaa858fe60d3288d5f8a56ab7513656d8e
description: Use ISO-8601 week and year placeholders in custom date formats for supported locales.
---
[Skip to main content](#main-content)

# 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:

<table style="width: 100%;mc-table-style: url('Resources/TableStyles/Basic-Border-Light.css');" class="TableStyle-Basic-Border" cellspacing="0"><colgroup><col class="TableStyle-Basic-Border-Column-Column1"> <col class="TableStyle-Basic-Border-Column-Column1"> <col class="TableStyle-Basic-Border-Column-Column1"></colgroup><tbody><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1"><b>Calendar System</b></td><td class="TableStyle-Basic-Border-BodyE-Column1-Body1"><b>Week Number</b></td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1"><b>Year Number</b></td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1">Standard Gregorian</td><td class="TableStyle-Basic-Border-BodyE-Column1-Body1">1</td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1">2011</td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyB-Column1-Body1">ISO-8601</td><td class="TableStyle-Basic-Border-BodyB-Column1-Body1">52</td><td class="TableStyle-Basic-Border-BodyA-Column1-Body1">2010</td></tr></tbody></table>

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:
    
    <table style="width: 100%;mc-table-style: url('Resources/TableStyles/Basic-Border.css');" class="TableStyle-Basic-Border" cellspacing="0"><colgroup><col class="TableStyle-Basic-Border-Column-Column1"> <col class="TableStyle-Basic-Border-Column-Column1"> <col class="TableStyle-Basic-Border-Column-Column1"></colgroup><tbody><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1"><b>Annotation</b></td><td class="TableStyle-Basic-Border-BodyE-Column1-Body1"><b>Calendar to Use</b></td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1"><b>Example Format String</b></td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1">[Y]</td><td class="TableStyle-Basic-Border-BodyE-Column1-Body1">ISO-8601</td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1">ww[Y] yyyy[Y]</td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyB-Column1-Body1">[y]</td><td class="TableStyle-Basic-Border-BodyB-Column1-Body1">Standard Gregorian</td><td class="TableStyle-Basic-Border-BodyA-Column1-Body1">ww[y] yyyy[y]</td></tr></tbody></table>

  

Important: To get correct ISO-8601 week numbering, your computer's location must be set to one of the [above](#Expand) 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](https://help.tableau.com/v0.0/pro/desktop/en-us/date_properties.htm).)

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.

<table style="width: 100%;mc-table-style: url('Resources/TableStyles/Basic-Border.css');" class="TableStyle-Basic-Border" cellspacing="0"><colgroup><col class="TableStyle-Basic-Border-Column-Column1"> <col class="TableStyle-Basic-Border-Column-Column1"></colgroup><tbody><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1"><b>Format string</b></td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1"><b>Formatted output</b></td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1">yyyy</td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1">2013</td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1">yyyy[Y]</td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1">2014</td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1">yyyy ww</td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1">2014 1</td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1">yyyy mm</td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1">2013 12</td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1">ww yyyy</td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1">1 2014</td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1">mm yyyy</td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1">12 2013</td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1">ww yyyy[y]</td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1">1 2013</td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1">mm yyyy[Y]</td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1">12 2014</td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1">yyyy mm ww</td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1">2013 12 1</td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1">mm yyyy ww</td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1">12 2013 1</td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1">ww mm yyyy</td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1">1 12 2013</td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1">ww mm yyyy[Y]</td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1">1 12 2014</td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1">ww yyyy mm</td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1">1 2014 12 (format is ambiguous)</td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1">ww yyyy[y] mm</td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1">1 2013 12</td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1">ww yyyy mm yyyy</td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1">1 2014 12 2013</td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyE-Column1-Body1">ww yyyy yyyy mm</td><td class="TableStyle-Basic-Border-BodyD-Column1-Body1">1 2014 2013 12</td></tr><tr class="TableStyle-Basic-Border-Body-Body1"><td class="TableStyle-Basic-Border-BodyB-Column1-Body1">yyyy mm ww yyyy</td><td class="TableStyle-Basic-Border-BodyA-Column1-Body1">2013 12 1 2014</td></tr></tbody></table>