X
Xarky
Hi,
I am using the following code to display a datagrid on my page. Now
one of the columns is of type DateTime(DataField="myDate"). Now when
the datagrid is being shown, the date is given in the following
format: 4/30/2005 12:00:00AM
Now I require to show only the date, ie time is not required. What
code should I add to change the behaviour to that specified.
<aspataGrid id="dataGridNextSessions" runat="server" Height="240px"
Width="312px" BackColor="White" BorderWidth="1px" BorderStyle="None"
BorderColor="#CCCCCC" CellSpacing="2" CellPadding="3"
AllowSorting="True" AutoGenerateColumns="False"
DataKeyField="StudentID">
<FooterStyle ForeColor="#000066" BackColor="White"></FooterStyle>
<SelectedItemStyle Font-Bold="True" ForeColor="White"
BackColor="#669999"></SelectedItemStyle>
<ItemStyle ForeColor="#000066"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="White"
BackColor="#006699"></HeaderStyle>
<Columns>
<asp:BoundColumn DataField="StudentID" HeaderText="Student
ID"></asp:BoundColumn>
<asp:BoundColumn DataField="myDate" HeaderText="Session
Date"></asp:BoundColumn>
</Columns>
<PagerStyle HorizontalAlign="Left" ForeColor="#000066"
BackColor="White" Mode="NumericPages"></PagerStyle>
</aspataGrid>
Can someone help me out
Thanks in Advance
I am using the following code to display a datagrid on my page. Now
one of the columns is of type DateTime(DataField="myDate"). Now when
the datagrid is being shown, the date is given in the following
format: 4/30/2005 12:00:00AM
Now I require to show only the date, ie time is not required. What
code should I add to change the behaviour to that specified.
<aspataGrid id="dataGridNextSessions" runat="server" Height="240px"
Width="312px" BackColor="White" BorderWidth="1px" BorderStyle="None"
BorderColor="#CCCCCC" CellSpacing="2" CellPadding="3"
AllowSorting="True" AutoGenerateColumns="False"
DataKeyField="StudentID">
<FooterStyle ForeColor="#000066" BackColor="White"></FooterStyle>
<SelectedItemStyle Font-Bold="True" ForeColor="White"
BackColor="#669999"></SelectedItemStyle>
<ItemStyle ForeColor="#000066"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="White"
BackColor="#006699"></HeaderStyle>
<Columns>
<asp:BoundColumn DataField="StudentID" HeaderText="Student
ID"></asp:BoundColumn>
<asp:BoundColumn DataField="myDate" HeaderText="Session
Date"></asp:BoundColumn>
</Columns>
<PagerStyle HorizontalAlign="Left" ForeColor="#000066"
BackColor="White" Mode="NumericPages"></PagerStyle>
</aspataGrid>
Can someone help me out
Thanks in Advance