You need to sign in to do that
Don't have an account?
sam_Admin
Adding date format to the VF page
Hello,
I have VF page where it displays the related cases upon selecting the case owner on top , the case owner drop down appears on left hand side of screen now i want to add the todays date on the right hand side? is it possible to add the date ?
This is what i have for case owner drop down now how to add date to the below?
<apex:pageBlockSection >
<apex:inputField id="own" value="{!case.Case_Owner__c}" onChange="getSelectedId('{!$Component.own}');"/>
</apex:pageBlockSection>
TIA!
Dates can be added like so:
Today's date and time is: {!NOW()} gives you Today's date and time is: Mon Jul 21 16:12:10 GMT 2008
Today's date is: {!TODAY()} gives you Today's date is Mon Jul 21 00:00:00 GMT 2008
More details here:
http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#StartTopic=Content/pages_variables_functions.htm?SearchType=Stem
I have tried using {!TODAY()} but i guess i can't use it in input function since it's not a field so how do i use it?
<apex:pageBlockSection >
<apex:inputField id="own" value="{!case.Case_Owner__c}" onChange="getSelectedId('{!$Component.own}');"/>
<apex:inputField value="{!TODAY()}"/>
</apex:pageBlockSection>
Use inputText for inputs that aren't bound to SObject fields.
Hi,
Use the below code snippets for reference
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Hi Sam,
I think you trying to display today's date on your visualforce page. So Try this out,
<apex:outputText value="{0,date,d MMM yyyy}">
<apex:param value="{!today()}" />
</apex:outputText>
Change the date formate as you wish in "Value" and mark it as a solutions if it works.
--
Thanks
Arish