# Date, string and type conversion functions

*Tableau Data Analyst Study Guide · Explore and Analyze Data · Last updated October 29, 2026 · https://www.certifyforce.com/study-guide/tableau-data-analyst/explore-and-analyze-data/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.

- Certification: Salesforce Tableau Data Analyst
- Exam section: Explore and Analyze Data
- Study guide: https://www.certifyforce.com/study-guide/tableau-data-analyst

**Official exam objective:**

> 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.

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

| Fact | Detail | Source |
|---|---|---|
| DATEDIFF syntax | DATEDIFF(date_part, date1, date2, [start_of_week]) returns an integer | [Date Functions](https://help.tableau.com/current/pro/desktop/en-us/functions_functions_date.htm) |
| DATEADD returns a date | Its second argument is a number interval, not a date | [Date Functions](https://help.tableau.com/current/pro/desktop/en-us/functions_functions_date.htm) |
| start_of_week omitted | The data source determines the start of week | [Date Functions](https://help.tableau.com/current/pro/desktop/en-us/functions_functions_date.htm) |
| Week start default | Set in Date Properties; falls back to the system locale | [Date Properties for a Data Source](https://help.tableau.com/current/pro/desktop/en-us/date_properties.htm) |
| DATEPARSE format | Must match the string exactly, including separators | [Convert a Field to a Date Field](https://help.tableau.com/current/pro/desktop/en-us/data_dateparse.htm) |
| DATEPARSE connectors | Non-legacy Excel and text files, Google Sheets, MySQL, Oracle, PostgreSQL, Tableau extracts and a few others | [Date Functions](https://help.tableau.com/current/pro/desktop/en-us/functions_functions_date.htm) |
| MAKEDATE input | Three numbers: year, month, day | [Type Conversion](https://help.tableau.com/current/pro/desktop/en-us/functions_functions_typeconversion.htm) |
| Negative SPLIT token | Counts tokens from the right | [String Functions](https://help.tableau.com/current/pro/desktop/en-us/functions_functions_string.htm) |
| Oracle SPLIT | Left only, maximum 10 splits | [String Functions](https://help.tableau.com/current/pro/desktop/en-us/functions_functions_string.htm) |
| INT | Truncates toward zero: INT(-9.7) = -9 | [Type Conversion](https://help.tableau.com/current/pro/desktop/en-us/functions_functions_typeconversion.htm) |

## Check yourself

- 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?

## Sources

- [Date Functions](https://help.tableau.com/current/pro/desktop/en-us/functions_functions_date.htm)
- [String Functions](https://help.tableau.com/current/pro/desktop/en-us/functions_functions_string.htm)
- [Type Conversion](https://help.tableau.com/current/pro/desktop/en-us/functions_functions_typeconversion.htm)
- [Convert a Field to a Date Field](https://help.tableau.com/current/pro/desktop/en-us/data_dateparse.htm)
- [Date Properties for a Data Source](https://help.tableau.com/current/pro/desktop/en-us/date_properties.htm)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 6 linked practice questions, and unlimited timed mock exams are included with the Tableau Data Analyst pack (USD $19): https://www.certifyforce.com/practice-exams
