Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Mike,
when you say last day of the month, you mean the date? You could do it like this:
IF(MONTH( CloseDate ) = 12,DATE(YEAR( CloseDate),12,31), DATE(YEAR( CloseDate),MONTH( CloseDate)+1,1)-1 )
That takes care of leap years, too.
Marc
Thanks, that worked perfectly.
Any suggestion on how to display the Close Month as the Month Name and not just the first day of the month?
Sure.In a Formula (text) field you can do this.
CASE (MONTH(CloseDate),
"1","January",
"2","February",
.
"12","December",
"")
Unfortunately, you can not change the format of a Date field directly like in Excel for example.
Mike,
when you say last day of the month, you mean the date? You could do it like this:
IF(MONTH( CloseDate ) = 12,DATE(YEAR( CloseDate),12,31),
DATE(YEAR( CloseDate),MONTH( CloseDate)+1,1)-1 )
That takes care of leap years, too.
Marc
All Answers
Mike,
when you say last day of the month, you mean the date? You could do it like this:
IF(MONTH( CloseDate ) = 12,DATE(YEAR( CloseDate),12,31),
DATE(YEAR( CloseDate),MONTH( CloseDate)+1,1)-1 )
That takes care of leap years, too.
Marc
Thanks, that worked perfectly.
Any suggestion on how to display the Close Month as the Month Name and not just the first day of the month?
Sure.In a Formula (text) field you can do this.
CASE (MONTH(CloseDate),
"1","January",
"2","February",
.
.
"12","December",
"")
Unfortunately, you can not change the format of a Date field directly like in Excel for example.