Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Salesforce
  3. Question
Salesforce

How to calculate days from the date in Salesforce?

Asked by Nakano Hase Aug 22, 2021 1.3K views 1 answer
Share

About this question

I'm looking for a way to calculate the days, here below is my requirement:

If the calendar interval is 90 days and the LastCompletionDate is 04/05/2015 then find the # of days.

Here is what I have gathered.

String CalendarInterval = 90; //days; Date daysDiff = CalendarInterval - LastCompletionDate; //04/05/2015 If the DaysDiff >= 90 { //create entry in Order Object }

Your answer

1 Answer

More Salesforce discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Salesforce Blogs

Guides, tips and career advice on Salesforce from JanBask experts.