Difference between 2 dates in Salesforce

cafeforce
cafeforce 3k Views Add a Comment

Calculate the difference between 2 dates easily with the below code. You can calculate the difference between 2 dates on a VF page itself or in Apex code. Salesforce provides standard methods to give the difference between 2 dates. To refer to the Salesforce Date Class Click Here.

For calculation of the difference between 2 datetimes Click Here.

To find the days between 2 date fields, Checkout the below code:

  • Visualforce Page

  • APEX

Also Check:

For any queries or suggestions, comment below.

Cheers … Happy Coding … 🙂

TAGGED:
Share This Article
Leave a comment
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments