working with date types in a gridview

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!
 
T

TDAVISJR

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.
 
A

Adam Sandler

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,149
Latest member
Vinay Kumar Nevatia0
Top