Welcome to my blog

I have been working with Salesforce for quite a while, so don’t hesitate to contact me if you have any questions or want some advice.

s f

Subscribe
Follow Us
h

Calculate the End date of the Month from Start Date

 . Adminstrator  . Calculate the End date of the Month from Start Date

Calculate the End date of the Month from Start Date

How to Calculate End Date of Month From Start Date in Salesforce?

You need to create a formula field with Date Field Type and use Below formula field

DATE( 
YEAR(Start_date__c), 
MONTH(Start_date__c), 
CASE( MONTH(Start_date__c), 
1, 31, 
2, IF( MOD( YEAR(Start_date__c), 4) = 0, 29, 28), 
3, 31, 
4, 30, 
5, 31, 
6, 30, 
7, 31, 
8, 31, 
9, 30, 
10, 31, 
11, 30, 
12, 31, 
0 
) 
)

Post a Comment