Author: PriyanViji | Posted on: 1/10/2009 8:12:19 AM | Views : 264

hi all,

 i am using sql server 2005, i am writing a sql query, which is binded with a gridview to list some set of records.  while writing this query, i converted the date fields to dd/MM/YYYY format and binded with gridview.  but when i try to do the header sort for this date field, the sorting is not proper since it is not date field (as i converted to varchar for "dd/MM/YYYY" format).  moreover, i could not do anything with gridview level also, because i am not using any template column for gridview to bind this sql query.  how to write a query which displays a field in "dd/MM/YYYY" format, but it should be of datatype "datetime".  any help would be greatly appreciated.

 

Thanks,

Viji
...

Go to the complete details ...