Removing time from a gridview that is bound to a date/time field in sqlserver

use this for DATE only

<asp:BoundField DataField="Date" HeaderText="Date" HtmlEncode="False" DataFormatString="{0:d}"></asp:BoundField>

this for TIME only

<asp:BoundField DataField="Time" HeaderText="Time" HtmlEncode="False" DataFormatString="{0:t}"></asp:BoundField>

Post a Comment

0 Comments