What is the difference between Tableau’s DATETRUNC() and DATEPART() functions?

Tableau Hard

Tableau — Hard

What is the difference between Tableau’s DATETRUNC() and DATEPART() functions?

Key points

  • DATETRUNC() focuses on truncating dates to a specified period
  • DATEPART() targets extracting specific date components
  • Function outputs differ significantly
  • Understanding these differences is vital for correct usage

Ready to go further?

Related questions