You need to sign in to do that
Don't have an account?
how to format the date;
i am having issue with date field.
i have one field of type Date in my custom object. and i am storing the date value in it successfully.
here is my code:
public Date agendaDate2; // user name which will be provided by user
public Date getAgendaDate2()
{
return agendaDate2;
}
public void setAgendaDate2(Date dateValue)
{
agendaDate2= dateValue;
}
i am showing date value in <apex:inputText> my VF page
but it shows the "Fri Nov 18 00:00:00 GMT 2011" in this format.
i want to show this date in 12/11/2011 format.
show how can i do that ?
please help i am newbie in salesforce.
any kind of help will be greatly appriciated.
thanks in advance...
Vishal
http://boards.developerforce.com/t5/Visualforce-Development/how-to-format-the-date-and-time/m-p/354515#M42492
You have already asked the question once and i answered it.
All Answers
http://boards.developerforce.com/t5/Visualforce-Development/how-to-format-the-date-and-time/m-p/354515#M42492
You have already asked the question once and i answered it.
He is asking how to format the value of an INPUTTEXT field, your solution is for an OUTPUTTEXT field, therefore you have not actually answered his question.
The way that I ended up using to do this solves the issue, but was a little complicated. First, give your apex:inputtext an id.
Next, in your visualforce controller, create a public string to be used on your VF page. The function above gets the object that you are referencing in the page controller (assuming the name used is 'obj') and will either return a formatted string or an empty string.
Next, using jQuery, create a document.ready function:
It's a 3-step process, but it works. I used it for a calendar using jQueryUI (http://jqueryui.com/datepicker/" target="_blank).