Hi All,
In my page I have date column inside my telerik radgrid. On clicking of the column header the date is not sorting properly. Tag is like this -
The date is sorting only from month not from year, month and date. In the database the data type is smalldatetime. While retriving from database, I am using 'convert(char(10),GETDATE(),101)' .
The result I am getting is
12/30/2011
12/28/2011
12/20/2011
11/30/2011
1/04/2012
It should be
11/30/2011
12/20/2011
12/28/2011
12/30/2011
1/04/2012
Thanks in Advance.
Akki
In my page I have date column inside my telerik radgrid. On clicking of the column header the date is not sorting properly. Tag is like this -
<
telerik:GridBoundColumn
DataField
=
"date"
HeaderText
=
"Date"
UniqueName
=
"date"
ReadOnly
=
"true"
AllowSorting
=
"true"
DataType
=
"System.DateTime"
DataFormatString
=
"{0:MM/dd/yyyy}"
SortExpression
=
"date"
/>
The date is sorting only from month not from year, month and date. In the database the data type is smalldatetime. While retriving from database, I am using 'convert(char(10),GETDATE(),101)' .
The result I am getting is
12/30/2011
12/28/2011
12/20/2011
11/30/2011
1/04/2012
It should be
11/30/2011
12/20/2011
12/28/2011
12/30/2011
1/04/2012
Thanks in Advance.
Akki