SFDC - Get month as text
SFDC - Get month as text in reports or formula fields?
Here is how you can achieve it:
To get month as the text you can use a CASE statement to convert the number derived from the MONTH() formula:
CASE(MONTH(CloseDate), 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")
Additionally, if you would like to add the year in the end:
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)))
#SFDC #SALESFORCE
Comments
Post a Comment