Formatting results to show just date, not time

In many situations it may be preferable to show just a date such as "9/21/2007" as opposed to both date and time, such as "9/21/2007 12:15:03AM"

To accomplish this, we assume you already have a GridView or other view which brings up a Date column. The steps to properly format the Date column to just show date are:

1. Click on the expander arrow at the upper right of the Gridview, and select Edit Columns

2. In the lower left window, highlight the Date field, which causes the bound field properties window to show up on the right

3.Set the DataFormatString to: {0:MM/dd/yyyy}

4. Set HTMLEncode to false, click OK, and Save

That's it. When you preview in Browser, the date will show, but not the time.

Like how fast this site is? I use and recommend  Arvixe  for asp.net hosting
Copyright Information: All graphics on this site are copyrighted and may not be used.