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
neeruneeru 

How to display current month name

Hi All

 

my need is i want to create a formula field it displays current month name...is it possible to display current month  name using formula field??

 

Thanks,

Jake

Best Answer chosen by Admin (Salesforce Developers) 
iKnowSFDCiKnowSFDC

Use DATEVALUE to convert the CreateDate to a date from a datetime field. 

 

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",
"None")

All Answers

JBabuJBabu

Hi,

 

Use the below:

 

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",
"None")

 

neeruneeru

Thanx For reply JBabu

i am getting error like this

 

 

Error:Incorrect parameter type for function 'MONTH()'. Expected Date, received DateTime

 

Thanks,

Jake

iKnowSFDCiKnowSFDC

Use DATEVALUE to convert the CreateDate to a date from a datetime field. 

 

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",
"None")

This was selected as the best answer
neeruneeru

Thanx Joanc

 

Now its working fine..

 

 

Thanks,

Jake

Ravi iBingRavi iBing
 Error: Formula result is data type (Text), incompatible with expected data type (Date).

This is the error message im receiving while using this formula.