0

I have searched and searched and have not found a clear answer for this issue:

When I set a column as a date column in a GridView and go into the grid and edit a date, it by default leaves a generic TimeStamp after the date like this (09/12/2017 00:00:00).

How do I remove the TimeStamp?

Simon B.
  • 13
  • 2

1 Answers1

0

Make sure you have formatting string like this ({0:d}) and have set apply format in edit mode true like this (ApplyFormatInEditMode="true").

And implement to BoundField like this:

<asp:BoundField DataField="DataDate" ApplyFormatInEditMode="true" DataFormatString="{0:d}" 
     SortExpression="DataDate" HeaderText="Header Date" />