Hi,
I have posted a question of formatting form earlier and the solution provided by you was to use mapValueToDisplay.
I need to format date field and here are the prerequisits
1) I have an XML file through which I am getting the date in the following format
2) I have a dynamic form where I am fetching all the values from the XML and displaying them as a static text for all my fields (text, date, checkbox etc)
for Date I need to get the value of milliseconds and get the date in the following format
Friday, November 04, 2005 11:03:00 AM
I am doing as below, but still its displaying me the milliseconds value as it is.
Can you please guide me whats going wrong and how to go ahead.
I have posted a question of formatting form earlier and the solution provided by you was to use mapValueToDisplay.
I need to format date field and here are the prerequisits
1) I have an XML file through which I am getting the date in the following format
Code:
<createdOn>
<milliseconds>1194252131000</milliseconds>
<asText>
<date>11/5/07</date>
<time>2:12:11 PM</time>
</asText>
</createdOn>
for Date I need to get the value of milliseconds and get the date in the following format
Friday, November 04, 2005 11:03:00 AM
I am doing as below, but still its displaying me the milliseconds value as it is.
Code:
{ title:"Last Accessed On", type: "staticText", wrapTitle: false, name:"milliseconds",
mapValueToDisplay:function(form, item, value) {
var date = this.getValue();
return(date.toLocaleString());
}
Comment