Thursday, March 5, 2020

How to find last date of the month in formula in salesforce

In this formula, I am using today's date you can replace your date.

Sample Formula
IF(
  MONTH(TODAY()) = 12,
  DATE( YEAR( TODAY()), 12, 31 ),
  DATE( YEAR( TODAY() ), MONTH ( TODAY() ) + 1, 1 ) - 1
)

Output

No comments:

Post a Comment