You need to sign in to do that
Don't have an account?
Buss
Date format as "DD MMM,YYYY"
Hi All,
i want to know is there any way to get date format as 'DD MMM,YYYY'.i.e 20 Mar,2011.
if possibe, Pls can you explain how do i get that date format.
in my requirement having both Standard and Custom Pages on both Pages i need dispaly in "DD MMM,YYYY" Format dates.
Reds,
Buss
Hey,
The below formula will make date field to format u mentioned in post:
Lets say 'Due date' is field on you object (1/4/2012) and u want it like '4 jan, 2012' then make formula field with below formula.
********************************************************************
text(DAY( Due_date__c )) +' '+ CASE( MONTH( Due_date__c ) ,
1, "Jan",
2, "Feb",
3, "Mar",
4, "Apr",
5, "May",
6, "Jun",
7, "Jul",
8, "Aug",
9, "Sep",
10, "Oct",
11, "Nov",
12, "Dec",
"None") +', '+ Text(YEAR( Due_date__c ))
***************************************************************
Regards
San
All Answers
Hi,
You can use the below code snippets for reference
datetime dt= system.now();
system.debug(' ??? ??? ' + dt.format('dd MMM,yyyy'));
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Hey,
The below formula will make date field to format u mentioned in post:
Lets say 'Due date' is field on you object (1/4/2012) and u want it like '4 jan, 2012' then make formula field with below formula.
********************************************************************
text(DAY( Due_date__c )) +' '+ CASE( MONTH( Due_date__c ) ,
1, "Jan",
2, "Feb",
3, "Mar",
4, "Apr",
5, "May",
6, "Jun",
7, "Jul",
8, "Aug",
9, "Sep",
10, "Oct",
11, "Nov",
12, "Dec",
"None") +', '+ Text(YEAR( Due_date__c ))
***************************************************************
Regards
San
Thanks Guys,
While debugging it is Showing on Console, but doing this Operation on My Object Date variable showing error as "Method does not valid as format() with String Argument".
So according to my uderstanding these Helpful to display on VFPage, but not to do Operation on Object Date Variables.
Reds,
Buss
Hi,
Change the Formula Return Type from date to text.
I have two date fields stacked one above the other and when the dates are displayed 01 Nov 2015 is shown as
1 Nov 2015 below that is
30 Nov 2015
It looks a bit off that way and wondered if it could be adjusted.
Thank you.
This solves the issue with the date padding mentioned by Erik.
LPAD(TEXT(DAY( Due_date__c)), 2,'0') +' '+ CASE( MONTH(Due_date__c) ,
1, "Jan",
2, "Feb",
3, "Mar",
4, "Apr",
5, "May",
6, "Jun",
7, "Jul",
8, "Aug",
9, "Sep",
10, "Oct",
11, "Nov",
12, "Dec",
"None") +', '+TEXT(YEAR(Due_date__c))