DataFormatString Date

  • Thread starter Nico VanHaaster
  • Start date
N

Nico VanHaaster

Hey guys,

This should be really simple however i just can't figure it out. I am
using a GridView to display hours results from a database. Now the date
field in the database is formated as a short date (Access) mm/dd/yyyy
however when ever it is displayed back on the page it is displayed as
MM/dd/yyyy hh:mm:ss

Now this is my code for the boundfield. Any Quick Pointers?
<asp:BoundField DataField="Date" DataFormatString="{0:MM/dd/yyyy}"
HeaderText="Date"
SortExpression="Date">
<ItemStyle HorizontalAlign="Center" />
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>

Thanks In Advance

Nico
 

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,989
Messages
2,570,207
Members
46,783
Latest member
RickeyDort

Latest Threads

Top