working with date types in a gridview

  • Thread starter Thread starter Adam Sandler
  • Start date Start date
A

Adam Sandler

Hello,

In VWD 2005 here. Working with a gridview that has the edit button
enabled. One of the columns in the grid is of date type in the
database. When then user edits the date, clicks the update button, and
the gridview is databound again, "12:00:00 AM" appears next to the
recently edited date.

I only want to work with dates... not times. Is there a property or
some code I'm missing to keep only dates in the gridview and not the
time information?

Thanks!
 
Yes. There is a property you can change. For that column, set the
DateFormatString to {0:d} and the HtmlEncode property to False. That should
do it.
 
TDAVISJR said:
Yes. There is a property you can change. For that column, set the
DateFormatString to {0:d} and the HtmlEncode property to False. That should
do it.

Thanks for the reply... I cannot find the DateFormatString and
HtmlEncode properties you are mentioning...

If I click the tasks menu for the Gridview, slect Edit Columns, In
Selected Fields -- select the column name, and look at the Template
Field Properties on the right... there are no properties avaliable with
the previously mentioned names.

Any suggestions?
 
Back
Top