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
Bhaskar ChowdaryBhaskar Chowdary 

date format

Hi Buzzard please explain me why we use this 0 in date format

 

 

{0,date,yyyy-mm-dd}

 

 

Here please explain about ' 0 '

@anilbathula@@anilbathula@
Hi Bhaskar,

Go through this link you will find the solution:-
http://salesforce-stuff.blogspot.in/2011/10/format-date-in-visualforce.html

Subhani_SFDCSubhani_SFDC

Hi Bhaskar,

 

Please refer the followin link once. It might help you to solve your issue

 

http://salesforce.stackexchange.com/questions/476/visualforce-locale-specific-date-format

 

Thanks

Subhani

Salesforce Certified Developer

www.mydbsync.com

Arunkumar.RArunkumar.R

Hi Bhaskar,

 

 

In Date formatting 0 is corresponds to the param tag which you have mentioned

 

For Example consider this below ,

Here we have one param tag with value of Now(), index of this param tag is 0

<apex:page >
<apex:outputText value="The formatted time right now is:
{0,date,yyyy.MM.dd G 'at' HH:mm:ss z}">
<apex:param value="{!NOW()}" />
</apex:outputText>
</apex:page>

 

 

Suppose if i have two param tags means and i would like to call today function means the param index is 1, so u need the call 1 in the date format..

 

<apex:page >
<apex:outputText value="The formatted time right now is: 
{1,date,yyyy.MM.dd G 'at' HH:mm:ss z}">
<apex:param value="{!NOW()}" />

<apex:param value="{!Today()}" />

</apex:outputText>
</apex:page>

 

 

Hope this may helps you...!


If you found this answer helpful to you... Please accept this as a Solution and  give kudos by clicking on the star icon.

 

Thanks and Regards,

Arunkumar.R | Salesforce Certified Developer