B
bienwell
Hi,
I have a problem of displaying data bound by a datalist control. In my
table, I have a field Start_date which has Short Date data type. I tried to
update this field by Current Date. After that, I display End_Date on the
DataList control. The output looks like 3/18/2005 12:00:00 AM . I'd
like to format data for this field to be 3/18/2005. Please help me.
Thanks in advance.
=====================================================================
My DataList Control with the declaration as following:
<aspataList id="myDataList" OnItemDataBound="DataList_ItemBound"
Runat="Server" Width="500">
<HeaderTemplate>
<table border= "0">
</HeaderTemplate>
<ItemTemplate>
<tr>
<td class="dataTD" width= "100" >
<b>Start Date:</b> </b>
</td>
<td class="dataTD" width= "400">
<%# Container.DataItem("Start_Date") %>
</td>
</tr>
</ItemTemplate>
<SeparatorTemplate>
<tr>
<td colspan= "2" width= "500" align= "center">
<hr />
</td>
</tr>
</SeparatorTemplate>
<FooterTemplate>
<div align="center">
<tr>
<td colspan= "2" width= "500" align= "center">
</td>
</tr>
</table>
</FooterTemplate>
</aspataList>
I have a problem of displaying data bound by a datalist control. In my
table, I have a field Start_date which has Short Date data type. I tried to
update this field by Current Date. After that, I display End_Date on the
DataList control. The output looks like 3/18/2005 12:00:00 AM . I'd
like to format data for this field to be 3/18/2005. Please help me.
Thanks in advance.
=====================================================================
My DataList Control with the declaration as following:
<aspataList id="myDataList" OnItemDataBound="DataList_ItemBound"
Runat="Server" Width="500">
<HeaderTemplate>
<table border= "0">
</HeaderTemplate>
<ItemTemplate>
<tr>
<td class="dataTD" width= "100" >
<b>Start Date:</b> </b>
</td>
<td class="dataTD" width= "400">
<%# Container.DataItem("Start_Date") %>
</td>
</tr>
</ItemTemplate>
<SeparatorTemplate>
<tr>
<td colspan= "2" width= "500" align= "center">
<hr />
</td>
</tr>
</SeparatorTemplate>
<FooterTemplate>
<div align="center">
<tr>
<td colspan= "2" width= "500" align= "center">
</td>
</tr>
</table>
</FooterTemplate>
</aspataList>