Question: how to calculate difference between two dates in apex?
Answer: How to find number of days between two dates using Apex? Integer noOfDays = startDate. daysBetween(endDate); The above formula is used to find number of days between two dates.