Bird
Raised Fist0
Tableaubi_tool~20 mins

Custom date formats in Tableau - Practice Problems & Coding Challenges

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Challenge - 5 Problems
🎖️
Custom Date Format Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
dax_lod_result
intermediate
1:30remaining
Custom Date Format Output in Tableau
You have a date field 'Order Date'. You apply the custom date format MMM dd, yyyy in Tableau. What will be the output for the date 2024-06-15?
AJun 15, 2024
B06 15, 2024
C15 Jun, 2024
D2024-06-15
Attempts:
2 left
💡 Hint
MMM means the short month name, dd is day with leading zero, yyyy is full year.
visualization
intermediate
1:30remaining
Choosing the Correct Custom Date Format for a Dashboard
You want to display dates on a sales dashboard as 'Friday, June 14, 2024'. Which custom date format string should you use in Tableau to achieve this?
Addd, MMM dd, yyyy
Bdddd, MMMM dd, yyyy
CMM/dd/yyyy
Dyyyy-MM-dd
Attempts:
2 left
💡 Hint
dddd gives full weekday name, MMMM full month name.
🧠 Conceptual
advanced
2:00remaining
Understanding Tableau Date Format Tokens
Which of the following statements about Tableau custom date format tokens is correct?
A'dd' displays the day of the week, while 'ddd' displays the day of the month.
B'HH' displays the hour in 12-hour format, while 'hh' displays the hour in 24-hour format.
C'MM' displays the full month name, while 'MMM' displays the month as a number.
D'yy' displays the two-digit year, while 'yyyy' displays the four-digit year.
Attempts:
2 left
💡 Hint
Think about how years and months are commonly formatted.
🔧 Formula Fix
advanced
2:00remaining
Fixing Incorrect Date Format Output
You applied the custom date format MMM-dd-yyyy in Tableau but the output shows Jun-15-24 instead of Jun-15-2024. What is the cause?
AUsing 'yy' instead of 'yyyy' causes the year to show as two digits.
BUsing 'MMM' causes the month to show as a number instead of name.
CUsing 'dd' causes the day to be omitted from the output.
DUsing dashes '-' is invalid in Tableau date formats.
Attempts:
2 left
💡 Hint
Check the year token length.
🎯 Scenario
expert
3:00remaining
Designing a Custom Date Format for International Audience
You need to create a Tableau dashboard for users in the US and Europe. The date should show as June 15, 2024 for US users and 15 June 2024 for European users. Which approach is best to handle this with custom date formats?
AUse the format 'yyyy-MM-dd' which is neutral and understood internationally.
BUse a single format 'dd MMMM, yyyy' for all users to keep it consistent.
CCreate two calculated fields with formats 'MMMM dd, yyyy' and 'dd MMMM yyyy' and show based on user locale.
DLet users manually change the date format in Tableau Desktop settings.
Attempts:
2 left
💡 Hint
Think about how to customize display based on user location.

Practice

(1/5)
1. What does the custom date format string yyyy-MM-dd display in Tableau?
easy
A. Month in four digits, day in two digits, year in two digits separated by slashes
B. Year in four digits, month in two digits, day in two digits separated by dashes
C. Day in four digits, month in two digits, year in two digits separated by dots
D. Year in two digits, month in two digits, day in two digits separated by spaces

Solution

  1. Step 1: Understand the format components

    yyyy means four-digit year, MM means two-digit month, and dd means two-digit day.
  2. Step 2: Analyze the separators

    The dashes - separate year, month, and day in the output.
  3. Final Answer:

    Year in four digits, month in two digits, day in two digits separated by dashes -> Option B
  4. Quick Check:

    yyyy-MM-dd = Year-Month-Day with dashes [OK]
Hint: Remember yyyy=year, MM=month, dd=day with separators [OK]
Common Mistakes:
  • Confusing MM with minutes
  • Mixing up order of year, month, day
  • Ignoring separator characters
2. Which of the following is the correct Tableau custom date format to show the date as 31/12/2024?
easy
A. dd/MM/yyyy
B. yyyy/MM/dd
C. MM/dd/yyyy
D. dd-MM-yyyy

Solution

  1. Step 1: Identify the desired output format

    The date is shown as day/month/year with slashes: 31/12/2024.
  2. Step 2: Match format string to output

    dd for day, MM for month, yyyy for year, separated by slashes /.
  3. Final Answer:

    dd/MM/yyyy -> Option A
  4. Quick Check:

    dd/MM/yyyy matches 31/12/2024 [OK]
Hint: Use slashes for separators and order day/month/year [OK]
Common Mistakes:
  • Using dashes instead of slashes
  • Swapping month and day positions
  • Using lowercase 'mm' which means minutes
3. Given the Tableau custom date format string MMM dd, yyyy, what would the date 2024-07-04 display as?
medium
A. 04 Jul, 2024
B. July 04, 2024
C. 07 04, 2024
D. Jul 04, 2024

Solution

  1. Step 1: Understand format tokens

    MMM shows abbreviated month name (e.g., Jul), dd is two-digit day, yyyy is four-digit year.
  2. Step 2: Apply to date 2024-07-04

    Month is July abbreviated as 'Jul', day is '04', year is '2024', combined as 'Jul 04, 2024'.
  3. Final Answer:

    Jul 04, 2024 -> Option D
  4. Quick Check:

    MMM dd, yyyy = Jul 04, 2024 [OK]
Hint: MMM means short month name like Jan, Feb, Mar [OK]
Common Mistakes:
  • Using full month name with MMM
  • Confusing MMM with MM (month number)
  • Swapping day and month order
4. You wrote the custom date format yyyy/dd/MM in Tableau but the dates look wrong. What is the likely error?
medium
A. Using lowercase 'dd' instead of uppercase 'DD' causes error
B. Missing separators like dashes or slashes between parts
C. Day and month positions are swapped, causing incorrect display
D. Year should be lowercase 'yyyy' to work correctly

Solution

  1. Step 1: Analyze the format string

    yyyy/dd/MM places day before month, which is unusual and likely not intended.
  2. Step 2: Understand correct order

    Typically, month comes before day in many formats, so swapping causes wrong date display.
  3. Final Answer:

    Day and month positions are swapped, causing incorrect display -> Option C
  4. Quick Check:

    Swapped dd and MM cause wrong date order [OK]
Hint: Check order: month usually before day, not after [OK]
Common Mistakes:
  • Confusing uppercase and lowercase tokens
  • Ignoring separators between date parts
  • Assuming lowercase yyyy is invalid
5. You want to create a Tableau custom date format that shows the full month name, day without leading zero, and two-digit year, like January 5, 24. Which format string should you use?
hard
A. MMMM d, yy
B. MMM dd, yyyy
C. MM/dd/yy
D. MMMM dd, yyyy

Solution

  1. Step 1: Identify required parts

    Full month name = MMMM, day without leading zero = d, two-digit year = yy.
  2. Step 2: Match format string

    MMMM d, yy matches exactly: full month, day no leading zero, comma, space, two-digit year.
  3. Final Answer:

    MMMM d, yy -> Option A
  4. Quick Check:

    MMMM d, yy = January 5, 24 [OK]
Hint: Use MMMM for full month, d for day no zero, yy for two-digit year [OK]
Common Mistakes:
  • Using dd for day adds leading zero
  • Using yyyy for four-digit year instead of two-digit
  • Using MMM for short month name instead of full