[SalesForce] Display Month Name and Year based from Date field eg: September 2021

Any assistance would be much appreciated!

Looking to build a formula field that extracts Month and Year of a custom date field. (if it is 28.09.2020 as the date then the formula field would display September 2020)

Best Answer

You can try the below formula. based on your date field you have to use "If" to do null check.

Best resources for building formulas https://help.salesforce.com/articleView?id=customize_functions.htm&type=5

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")  & " " &  TEXT(Year(DATEVALUE(CreatedDate)))