Formatting date fields (.asp)
In my DataAssist update form I have a date and time field that is not editable but displays on the form. How do I format these two fields so that they display correctly?
This is the code on the update form:
<tr>
<th class="WADADataTableHeader">Enroll Date:</th>
<td class="WADADataTableCell"><%=String(WADAparticipant_data.Fields.Item("enroll_date").Value==null?"":(WADAparticipant_data.Fields.Item("enroll_date").Value)).replace(/"/g, '"')%></td>
</tr>
<tr>
<th class="WADADataTableHeader">Enroll Time:</th>
<td class="WADADataTableCell"><%=String(WADAparticipant_data.Fields.Item("enroll_time").Value==null?"":(WADAparticipant_data.Fields.Item("enroll_time").Value)).replace(/"/g, '"')%></td>
</tr>
This is how the date and time field display on the form:
Date: Thu Jan 28 00:00:00 EST 2010
Time:Sat Dec 30 21:43:31 EST 1899
The date and time on the access database are:
Date: 1/28/2010
Time: 9:43:31 PM