You need to sign in to do that
Don't have an account?
Tapasvini
formatting date
I want to format the date and display it into vf page.my code is:
<script>
function DynamicDatePicker(d_id)
{
DatePicker.pickDate(false,d_id.id,false);
}
</script>
<apex:inputText id="FromDate" value="{!FromDate}" onfocus="DynamicDatePicker(this);" onchange="checkDateFormatt(this.id);" size="20" disabled="false" style="width:150px;"/>
title: {!FromDate}
class:
public Date FromDate { get; set; }
I am getting the value is:Fri Sep 21 00:00:00 GMT 2012
but I want it like 09/21/2012.
I have tried format method but it doesnt work. So, can anyone give me the solution.
Thanks.
I have used this in one of my pages and gives me the desired output -
But I want to display it in javascript. So in that I cant use the <apex:outputtext>.
sorry didn't realize that.
You mentioned you tried format , did you try toString
something like, tostring(MM'/'dd'/'yyyy)