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
domdickdomdick 

Apex code no. of days from dates

Hi,

How to find no. of days between multiple dates (whether it's a weekly or monthly schedule) in APEX?

records into the sobject...
Multiple_Date__c     Payment__c
01/05/2014               200.00 
08/05/2014               200.00 
15/05/2014               200.00 
22/05/2014               200.00 
29/05/2014               200.00 
05/06/2014               200.00

Thanks!!
Swati GSwati G
Hi,

You can use daysBetween method of date to find difference between two date. Once you get days between you can identify whether it is a weekly or monthly schedule.


You can find date methods in below link:
http://www.salesforce.com/us/developer/docs/dbcom_apex230/Content/apex_methods_system_date.htm