function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Deepthi V 18Deepthi V 18 

How to calculate last date of the current month

AnudeepAnudeep (Salesforce Developers) 
Hi Deepthi, 

The following formula will give you last date of the current month 
 
IF( MONTH( TODAY() ) = 12, 
DATE( YEAR( TODAY() ), 12, 31 ), 
DATE( YEAR( TODAY() ), MONTH( TODAY() ) + 1, 1) - 1)

Also, Check out salesforce documentation on Sample Date Formulas

Let me know if this helps, if it does, please mark this answer as best so that others facing the same issue will find this information useful. Thank you
CharuDuttCharuDutt
Hii Deepthi
Try The Following code 
Formula field type date
IF( MONTH( TODAY() ) = 12, 
DATE( YEAR( TODAY() ), 12, 31 ), 
DATE( YEAR( TODAY() ), MONTH( TODAY() ) + 1, 1) - 1)
Please Mark It As Best Answer If it Helps Thank you!
 
Reddy RakeshReddy Rakesh
Hi Deepthi, 

ADDMONTHS(DATE(YEAR( TODAY()),1,31),MONTH(TODAY()) -1 )