+ Start a Discussion
SoundarSoundar 

How can i display superscript on Date Format

Hi Friends ,

How can i display the date format like 21st October 2016 .

Here i my origional coding 

<apex:outputtext value="{0, date,dd' 'MMMM' 'YYYY}">
      <apex:param value="{!Inspection_Sheet__c.Date__c}">
      </apex:param>
</apex:outputtext>

Output Is : 25 October 2016

Could you please help me , how can i display this format on visualforce page 25th october 2016

Many Thanks in Advance...!!!

Regards ,
Soundar ,
Best Answer chosen by Soundar
Bhavin Mehta 20Bhavin Mehta 20
Hi Sounder,

Below mentioned code can be used.

<apex:outputText value="{0,date,dd} <sup>th</sup> {0,date,MMMM} {0,date,YYYY} "  escape="false" > 
    <apex:param value="{!Today}" />

 

All Answers

Bhavin Mehta 20Bhavin Mehta 20
Hi Sounder,

Below mentioned code can be used.

<apex:outputText value="{0,date,dd} <sup>th</sup> {0,date,MMMM} {0,date,YYYY} "  escape="false" > 
    <apex:param value="{!Today}" />

 
This was selected as the best answer
SoundarSoundar
Bhavin Mehta,


I am really happy to see this output , it's working perfectly  Really thanks once again .

and i need to all the date format ,

for example:-

1st November 2016
2nd November  2016
3rd November  2016
4th November 2016
5th November 2016 
.
.
.
.
30th Nobember 2016

Kindly Help for this process .

Many Thanks In Advance ..!!

Regards,

Soundar Rajan P.
SoundarSoundar
HI Bhavin Mehta,

I Achieved This Process by the following code . really thanks to spent your valuable time for  myself .

My Origional Code : 

<!--ST  01 && 21 && 31 -->
 <apex:outputpanel rendered="{!IF(Day(Inspection_Sheet__c.Date__c ) = 1 || Day(Inspection_Sheet__c.Date__c ) = 21 ||
Day(Inspection_Sheet__c.Date__c ) = 31 , TRUE, FALSE) }" >
<apex:outputText value="{0,date,dd}<sup>st</sup> {0,date,MMMM} {0,date,YYYY} "  escape="false" > 
 <apex:param value="{!Inspection_Sheet__c.Date__c}" />
  </apex:outputText>
   </apex:outputpanel>
                                


                                <!--ND 02 && 22 -->
                                <apex:outputpanel rendered="{!IF(Day(Inspection_Sheet__c.Date__c ) = 2 || Day(Inspection_Sheet__c.Date__c ) = 22  , TRUE, FALSE) }" >
                                <apex:outputText value="{0,date,dd}<sup>nd</sup> {0,date,MMMM} {0,date,YYYY} "  escape="false" > 
                                <apex:param value="{!Inspection_Sheet__c.Date__c}" />
                                </apex:outputText>
                                 </apex:outputpanel>
                                 
                                  <!-- RD 3 && 23 -->
                                <apex:outputpanel rendered="{!IF(Day(Inspection_Sheet__c.Date__c ) = 3 || Day(Inspection_Sheet__c.Date__c ) = 23  , TRUE, FALSE) }" >
                                <apex:outputText value="{0,date,dd}<sup>rd</sup> {0,date,MMMM} {0,date,YYYY} "  escape="false" > 
                                <apex:param value="{!Inspection_Sheet__c.Date__c}" />
                                </apex:outputText>
                                 </apex:outputpanel>
                                 
                                 <!-- TH 4 && 5- 20 && 24 -30 -->
                                <apex:outputpanel rendered="{!IF(Day(Inspection_Sheet__c.Date__c ) != 1 && Day(Inspection_Sheet__c.Date__c ) != 21 && Day(Inspection_Sheet__c.Date__c ) != 21 && Day(Inspection_Sheet__c.Date__c ) != 31 && Day(Inspection_Sheet__c.Date__c ) != 2 && Day(Inspection_Sheet__c.Date__c ) != 22 && Day(Inspection_Sheet__c.Date__c ) != 3 && Day(Inspection_Sheet__c.Date__c ) != 23, TRUE, FALSE) }" >
                                <apex:outputText value="{0,date,dd}<sup>th</sup> {0,date,MMMM} {0,date,YYYY} "  escape="false" > 
                                <apex:param value="{!Inspection_Sheet__c.Date__c}" />
                                </apex:outputText>
                                 </apex:outputpanel>


Many Thanks !!

Regards,

Soundar 
+91 - 7418425418.
Bhavin Mehta 20Bhavin Mehta 20
Great Work! Nice logic.