Adminstrator · Salesforce

Calculate the End date of the Month from Start Date

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 
) 
)

2 thoughts on “Calculate the End date of the Month from Start Date

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s