Activity › Forums › Salesforce® Discussions › What are the different methods in date class in Salesforce? Salesforce® Discussions What are the different methods in date class in Salesforce? Posted by Aditya on February 20, 2020 at 11:35 AM what are the different methods in date class ? Shweta replied 6 years, 3 months ago 3 Members · 2 Replies 2 Replies Kirandeep Member February 20, 2020 at 11:46 AM Hi Aditya, List of Methods in date Class :- addDays(additionalDays) addMonths(additionalMonths) addYears(additionalYears) day() dayOfYear() daysBetween(secondDate) daysInMonth(year, month) isLeapYear(year) format() [adinserter block='9'] Shweta Member February 20, 2020 at 2:00 PM Date Methods in Salesforce: addDays: Adds the specified number of additional days to a Date. addMonths: Adds the specified number of additional months to a Date addYears: Adds the specified number of additional years to a Date day(): Returns the day-of-month component of a Date. dayOfYear(): Returns the day-of-year component of a Date. daysBetween(secondDate): Returns the number of days between the Date that called the method and the specified date. daysInMonth(year, month) format() month() newInstance(year, month, day) today() year() Log In to reply. Public All Members My Connections Only Me PublicAll MembersMy ConnectionsOnly Me Public All Members My Connections Only Me