Loading
Feature degradation | Gmail Email delivery failureRead More

How To Calculate Number Of Days In Month

Publish Date: Apr 13, 2024
Task

How to calculate number of days in each month?

Steps
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>]))))
Knowledge Article Number

001456806

 
Loading
Salesforce Help | Article