Explore and Analyze Data41% of the exam
Date, string and type conversion functions
Pick the right date function (DATEDIFF, DATEADD, DATEPART, DATETRUNC) and start_of_week, turn strings into dates with DATE or DATEPARSE, extract tokens with SPLIT and its per-source limits, test substrings with CONTAINS or FIND, and cast with STR, INT and FLOAT.
Create calculated fields: Write date calculations; Write string functions; Write logical and Boolean expressions; Write number functions; Write type conversion functions; Write aggregate functions; Write basic spatial calculations.
~7 min read · 6 practice questions ·
What the exam expects
- Choose DATEDIFF, DATEADD, DATEPART or DATETRUNC from the output a requirement needs, and predict how start_of_week changes a week count.
- Turn a string into a date with DATE or DATEPARSE, and cast with STR, INT and FLOAT.
- Extract a token with SPLIT from the left or right, and know which sources reject right-hand splits.
- Pick CONTAINS, FIND, STARTSWITH or ENDSWITH for a Boolean substring test.
- Logical, number, aggregate and spatial functions are taught in Logical, number, aggregate and spatial calculations; basic calculated fields in the Desktop Foundations unit Calculated fields and when to use parameters.
Key terms:
- date_part: a string constant such as 'day' or 'week' naming the part of a date to use.
- start_of_week: optional argument naming the first day of the week.
- Date format: the DATEPARSE pattern, such as 'dd-MMM-yyyy', that must match the string exactly.
- Token: one piece of a string between delimiters.
- Casting: converting a value to another data type.
Key facts
DATEDIFF syntax
- Detail
- DATEDIFF(date_part, date1, date2, [start_of_week]) returns an integer
DATEADD returns a date
- Detail
- Its second argument is a number interval, not a date
start_of_week omitted
- Detail
- The data source determines the start of week
Week start default
- Detail
- Set in Date Properties; falls back to the system locale
DATEPARSE format
- Detail
- Must match the string exactly, including separators
DATEPARSE connectors
- Detail
- Non-legacy Excel and text files, Google Sheets, MySQL, Oracle, PostgreSQL, Tableau extracts and a few others
MAKEDATE input
- Detail
- Three numbers: year, month, day
Negative SPLIT token
- Detail
- Counts tokens from the right
Oracle SPLIT
- Detail
- Left only, maximum 10 splits
INT
- Detail
- Truncates toward zero: INT(-9.7) = -9
Sources for this section (5)
- Where is a data source's default week start set, and what does start_of_week do to it?
- Why does INT(-9.7) return -9 rather than -10?
- Why does wrapping a numeric postal code in STR stop Tableau aggregating it?
- When should you use DATETRUNC rather than DATEPART?
The questions are free to read. Answers with their sources and self-grading are included with the pack.
Keep reading with the Tableau Data Analyst pack
- Core concepts
- Exam traps
- Worked scenario
The pack includes:
- All 30 lessons of the Tableau Data Analyst guide, with reading progress
- Interactive decision walks and step-by-step sequence steppers
- Practice exams purchase adds inline bank questions and topic practice (6 questions for this lesson)
- An official source cited for every claim
- An AI tutor that answers from the guide
- Choose guide-only, practice-only, or save $4 with both