From: Reggie Burnett Date: December 10 2004 4:19pm Subject: RE: MySqlDateTime in Datatables sorting by Text, not Date. List-Archive: http://lists.mysql.com/dotnet/265 Message-Id: <200412101619.iBAGJ3Rg001704@mail.mysql.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Pushed. > -----Original Message----- > From: Barry Zubel [mailto:barry@stripped] > Sent: Friday, December 10, 2004 2:35 AM > To: dotnet@stripped > Subject: RE: MySqlDateTime in Datatables sorting by Text, not Date. > > Thanks Reggie - mysql.bkbits.net isn't showing the latest build (certainly > from their web-based system) so can you push that out so that I can test > it > off :D > > Thanks buddy! > > B. > > -----Original Message----- > From: Reggie Burnett [mailto:reggie@stripped] > Sent: 10 December 2004 03:27 > To: 'Barry Zubel'; dotnet@stripped > Subject: RE: MySqlDateTime in Datatables sorting by Text, not Date. > > > I fixed this and marked the bug report closed. Thanks! > > > -----Original Message----- > > From: Barry Zubel [mailto:barry@stripped] > > Sent: Monday, December 06, 2004 3:43 AM > > To: dotnet@stripped > > Subject: MySqlDateTime in Datatables sorting by Text, not Date. > > > > Okay, an odd one that I've probably managed to screw up myself (tee > > hee). > > > > The following extracted code should reproduce the problem: (parts > > removed for brevity) > > > > sSql = "SELECT DATECOLUMN, SOMEOTHERFIELD FROM YOURTABLE ORDER BY > > SOMEOTHERFIELD ASC" (where DATECOLUMN is a DATE or DATETIME Mysql > > Type, SOMEOTHERFIELD can be > > anything) > > > > ... > > (instantiate connector, command, and dataadapter and fill datatable > > with > > results) > > ... > > > > myDataGrid.DataSource = myDataTable > > > > > > Now the important thing is to have source data that spans several > > months. When the datagrid is displayed, simply click on the DATECOLUMN > > column header to resort by date ascending or descending. > > > > I have found that the DataTable actually seems to text-sort, instead > > of date-sort. > > > > For example, The dates: > > > > 01/10/2004 > > 01/11/2004 > > 02/10/2004 > > 02/11/2004 > > > > Will appear IN THAT ORDER, instead of the more logical (and expected): > > > > 01/10/2004 > > 02/10/2004 > > 01/11/2004 > > 02/11/2004 > > > > (Based on the UK date format, which is DD/MM/YYYY) > > > > This has occurred since Beta 2, (I believe - I've not confirmed this > > yet) but I'd like someone else to verify that this is the case before > > I post something to the mysql bugzilla. > > > > Ta muchly! > > > > B. > > > > > > > > -- > > MySQL on .NET Mailing List > > For list archives: http://lists.mysql.com/dotnet > > To unsubscribe: http://lists.mysql.com/dotnet?unsub=reggie@stripped > > > > -- > MySQL on .NET Mailing List > For list archives: http://lists.mysql.com/dotnet > To unsubscribe: http://lists.mysql.com/dotnet?unsub=reggie@stripped