6 messages in com.mysql.lists.dotnetRE: MySqlDateTime in Datatables sorti...| From | Sent On | Attachments |
|---|---|---|
| Barry Zubel | 06 Dec 2004 01:42 | |
| Reggie Burnett | 09 Dec 2004 19:26 | |
| Barry Zubel | 10 Dec 2004 00:34 | |
| Guy Platt | 10 Dec 2004 01:33 | |
| Reggie Burnett | 10 Dec 2004 08:15 | |
| Reggie Burnett | 10 Dec 2004 08:18 |
| Subject: | RE: MySqlDateTime in Datatables sorting by Text, not Date.![]() |
|---|---|
| From: | Reggie Burnett (reg...@mysql.com) |
| Date: | 12/10/2004 08:18:49 AM |
| List: | com.mysql.lists.dotnet |
Pushed.
-----Original Message----- From: Barry Zubel [mailto:bar...@ablebox.com] Sent: Friday, December 10, 2004 2:35 AM To: dot...@lists.mysql.com 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:reg...@mysql.com] Sent: 10 December 2004 03:27 To: 'Barry Zubel'; dot...@lists.mysql.com 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:bar...@ablebox.com] Sent: Monday, December 06, 2004 3:43 AM To: dot...@lists.mysql.com 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=reg...@mysql.com
-- MySQL on .NET Mailing List For list archives: http://lists.mysql.com/dotnet To unsubscribe: http://lists.mysql.com/dotnet?unsub=reg...@mysql.com




