Q:

Data Table Sorting Issue

I have been fighting with a wiered yet simple problem. 
I have a Data table with some fields, one of the field is storing a datetime variable. 
Then I use that data table to populate the grid view.  Now I want to sort the values by default by that date field. 
Problem :  1/2/2012 12:00:00 AM (I dont want tht Time portion in the grid view, I tried using with a string field but that is affecting my sorting). 
Plz help me with this, I know this might be a simple one!! 

A:

You can do it easily.  If its a bound field in gridview, simply use
<asp:boundfield datafield="Your_Date_Column" dataformatstring="{0:MMMM d, yyyy}" htmlencode="false" />

Htmlencode property is must and it should be false.