Loading

How To Calculate Number Of Days In Month

Дата публикации: Apr 13, 2024
Задача

How to calculate number of days in each month?

Действия
Create a calculated field including the following formula. In this formula, the DATETRUNC function returns the first date of the current month and the DATEADD function adds 1 month to the first date of current month. Then, minus 1 day from the date to get the last date of the current month and the number of days is available by the DATE function.
DAY(DATEADD('day',-1,DATEADD('month',1,DATETRUNC('month',[<Date Field>]))))
Номер статьи базы знаний

001456806

 
Загрузка
Salesforce Help | Article