Hi Guys, I have a datagrid .
Dim strQuery As String
strQuery = "SELECT BENCHMARKNO 'BMK NO',BENCHMARKNAME 'BMK Name',CLIENTCODE 'Client ID',NOFILES 'No.of Files',REFERENCENO 'Reference No',NORESOURCES 'Resources',REPLACE(CONVERT(VARCHAR,STARTDATE,106),' ','-') AS 'Start Date', REPLACE(CONVERT(VARCHAR,FINISHDATE,106),' ','-') AS 'Finish Date', AUTHORIZEDBY 'Authorized By',JOBNO 'Converted To Job No',REMARKS 'Remarks' FROM QMS_BENCHMARK ORDER BY BENCHMARKNO"
Dim pBMKTrack As DataTable = GetTable(strQuery)
dGridview.DataSource = pBMKTrack
in that query , start date and finish date are columns.
if i can tried to sort the column. it doesn't sorted.
I got the dates like these
example : 01-jan-2012
03-Feb-2010
12-aug-2013
I want : 03-Feb-2010
01-jan-2012
12-aug-2013
total date format should be changed.
In DataBase
STARTTIME AND FINISHTIME COLUMNS DATATYPE ARE DATETIME.
Please help me ....