Troubleshoot a formula and fix a couple of errors.
The following formula, meant to return the last day of the current month, has a couple of errors in it:
IF( MONTH( NOW() ) = 12,
DATE( YEAR( NOW() ), 12, 31 ),
DATE( YEAR( NOW() ), MONTH( NOW() ) + 1, 1) - 1
Create a new formula with the same label, name, and data type that successfully compiles.
The following formula, meant to return the last day of the current month, has a couple of errors in it:
IF( MONTH( NOW() ) = 12,
DATE( YEAR( NOW() ), 12, 31 ),
DATE( YEAR( NOW() ), MONTH( NOW() ) + 1, 1) - 1
Create a new formula with the same label, name, and data type that successfully compiles.
- The formula should be of Date type and on the Case object
- The formula should have the name Last Day of Month and the resulting API name Last_Day_of_Month__c
- The formula should return the last day of the current month.
1) Create one custom 'Last Day of Month' formula field on case object of type date and enter the below formula.
IF(
MONTH( today() ) = 12,
DATE( YEAR( today() ), 12, 31 ),
DATE( YEAR( today() ), MONTH ( today() ) + 1, 1 ) - 1
)
No comments:
Post a Comment