how to get a short-date with gridview?

D

Dan

Hi,

I defined a gridview which must fetch a date field in Access. In the table,
the date are e.g. 05/06/2006, but the gridview gives 05/06/2006 0:00:00.

I couldn't find the property to get the short date.

Thanks
Dan
 
J

Jan Hyde

Hi,

I defined a gridview which must fetch a date field in Access. In the table,
the date are e.g. 05/06/2006, but the gridview gives 05/06/2006 0:00:00.

I couldn't find the property to get the short date.

Set the DataFormatString to the format you want, eg mine is
set to {0:d}

Then switch off HTMLEncode on that column.



Jan Hyde (VB MVP)
 

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

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top