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
thuskerthusker 

Formula Error -- Help Anyone???

I am trying to do a formula for our markeitng folks to add a field called "Month Lead Created", which will look at the Created Date for Leads and indicate the month that it was created in.  Example:  Lead created on 1/2/2008 = January.  I thought I knew how to build the formula based on another example, but I get an error when I do the syntax check.  Can anyone tell me how to fix it so it might work??
 
Formula is:
 
CASE(MONTH(CreatedDate) ,
1, "January",
2, "February",
3, "March",
4, "April",
5, "May",
6, "June",
7, "July",
8, "August",
9, "September",
10, "October",
11, "November",
12, "December", " ")
 
 
Error: Incorrect parameter for function MONTH(). Expected Date, received DateTime
 
 
JakesterJakester
I'm pretty sure you just need to throw a datevalue() function around the createddate like so:

Code:
CASE(MONTH(datevalue(CreatedDate)) ,
1, "January",
2, "February",
3, "March",
4, "April",
5, "May",
6, "June",
7, "July",
8, "August",
9, "September",
10, "October",
11, "November",
12, "December", " ")

 

thuskerthusker

Hey . . . worked like a charm.  THANK YOU!!!!

I'm terrible with formulas . . . but trying to get better.  Usually I have some examples that I try to use as "templates" but I get stuck a lot.  Thanks for the quick assistance!

JakesterJakester
You're very welcome - glad to be of assistance!