function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jd123jd123 

Addmonths problem

Hi

 

 I have two fields

     1. Start_Date__c

     2. End_Date__c

  

if I am giving date values like Start_Date__c=10/01/2012 and End_Date__c=3/31/2013

 

the next period should create based on  no of months difference between Start_Date__c and End_Date__c

 

first time is calculating right Start_Date__c=4/1/2013  and End_Date__c=9/30/2013

 

again it should calculate as same above. It should give result Start_Date__c=10/01/2012 and End_Date__c=3/31/2013

but it is giving Start_Date__c=10/01/2012 and End_Date__c=3/30/2013

 

I know it is giving wrong result when the month have 30 and 31