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
krhkrh 

Display day in date format

Hi guys,
I want to display day of the date in report. Start date is 2/10/2018 then need to display as Tue 2-Oct-2018.
Please help me to do this.
Thanks in advance
Best Answer chosen by krh
NagendraNagendra (Salesforce Developers) 
Hi,

Please find the below information.
CASE(MOD( CloseDate - DATE(1900, 1, 6), 7), 0, "Saturday", 1, "Sunday", 2,"Monday", 3, "Tuesday", 4, "Wednesday", 5, "Thursday", 6,"Friday","")+","+' '+
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", 
"December") +' '+ text(DAY( CloseDate )) +', '+ Text(YEAR( CloseDate ))
Result: If Date value in the date field is 5/7/2015, the result in this formula field would be Sunday, July 5, 2015
 
For more information on such formulas, refer to Common Date Formulas Hope this helps.

Kindly mark this as solved if the reply was helpful.

Thanks,
Nagendra
 

All Answers

Maharajan CMaharajan C
Hi,

Create the formula field with the return type as Text and use the below formula:

Instead of closedate use your field name:

text(DAY( CloseDate )) +'-'+ CASE( MONTH( CloseDate ) , 
1, "Jan", 
2, "Feb", 
3, "Mar", 
4, "Apr", 
5, "May", 
6, "Jun", 
7, "Jul", 
8, "Aug", 
9, "Sep", 
10, "Oct", 
11, "Nov", 
"Dec") +'-'+ Text(YEAR( CloseDate ))

Reference link to more formats:
https://help.salesforce.com/articleView?id=000123532&type=1

show the formula field in Report. Please allow the FLS to this field to display in Report.

Can you please Let me know if it helps or not!!!

If it helps don't forget to mark this as a best answer!!!

Thanks,
Maharajan.C
NagendraNagendra (Salesforce Developers) 
Hi,

Please find the below information.
CASE(MOD( CloseDate - DATE(1900, 1, 6), 7), 0, "Saturday", 1, "Sunday", 2,"Monday", 3, "Tuesday", 4, "Wednesday", 5, "Thursday", 6,"Friday","")+","+' '+
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", 
"December") +' '+ text(DAY( CloseDate )) +', '+ Text(YEAR( CloseDate ))
Result: If Date value in the date field is 5/7/2015, the result in this formula field would be Sunday, July 5, 2015
 
For more information on such formulas, refer to Common Date Formulas Hope this helps.

Kindly mark this as solved if the reply was helpful.

Thanks,
Nagendra
 
This was selected as the best answer
krhkrh
Hi Nagendra

I tried same what you suggested it is working for the date field which is entering manually, but when I'm applying same with Formula field of type date that time this formula is not displaying day .
Maharajan CMaharajan C
For Formula field of type date it won't support:

For Reporting purpose only you need this right then create formula field of type text why you are putting so much of effort on this:

If you want to use formula field of type text then you can use the below formula:

CASE(MOD( CloseDate - DATE(1900, 1, 6), 7), 0, "Sat", 1, "Sun", 2,"Mon", 3, "Tue", 4, "Wed", 5, "Thu", 6,"Fri","")+' '+ 
text(DAY( CloseDate )) +'-'+ CASE( MONTH( CloseDate ) , 
1, "Jan", 
2, "Feb", 
3, "Mar", 
4, "Apr", 
5, "May", 
6, "Jun", 
7, "Jul", 
8, "Aug", 
9, "Sep", 
10, "Oct", 
11, "Nov", 
"Dec") +'-'+ Text(YEAR( CloseDate ))

Can you please Let me know if it helps or not!!!

If it helps don't forget to mark this as a best answer!!!


Thanks,
Maharajan.C