Skip to main content
Serena Shergill (PatSnap) 님이 #Data Management에 질문했습니다
Formula field for Contract Duration to be populated when start date and end date has been filled in

 

I currently have a formula for Contract duration (months) which will populate once the user has entered the Start and End dates into date fields.

 

Current Formula:

 

((YEAR(End_date__c ) - YEAR(Start_Date__c)) * 12) + (MONTH(End_date__c ) - MONTH(Start_Date__c )) + 1

 

This formula only works for start date at the start of the month, for example:

 

Start Date: 01/06/18

 

End Date: 31/05/19

 

Contract Duration: 12 (months)

 

However, this formula does not work for the following dates:

 

Start Date: 05/06/18

 

End Date: 04/06/18

 

Contract length should equal to 12 months however, comes out as 13 months instead.

 

 
답변 7개
0/9000