The following Salesforce formula returns a date value, the first day of the next month based on the current date. You can replace TODAY()
with any date field.
IF(
MONTH( TODAY() ) = 12,
DATE( YEAR( TODAY() )+1, 1, 1 ),
DATE( YEAR( TODAY() ), MONTH ( TODAY() ) + 1, 1 )
)
If you have a date/time field, then you can convert date/time to date using DATEVALUE(expression)
function as mentioned in the following formula.
IF(
MONTH( DATEVALUE(CreatedDate) ) = 12,
DATE( YEAR( DATEVALUE(CreatedDate) )+1, 1, 1 ),
DATE( YEAR( DATEVALUE(CreatedDate) ), MONTH ( DATEVALUE(CreatedDate) ) + 1, 1 )
)