BASE DE CONNAISSANCES

How to Calculate the Date of the End of the Month


Date de publication : 20 Dec 2023
Date de dernière modification : 20 Dec 2023

Question

How to get the date of the end of a month.
 

Environnement

  • Tableau Desktop 2022.3+

Réponse

Because there is no native date function to determine the end of the month from a date field, create a date calculation as instructed below to obtain the end of the month. 

DATEADD('day',-1,(DATEADD('month',1,DATETRUNC('month',[Order Date]))))

Informations supplémentaires

Vote on the Tableau Community Idea to have a default function added to the product.
Cet article vous a-t-il permis de résoudre le problème ?