It seems to me that if the sorting is done in MySQL with a "SORT BY" statement in a Base form query, then the dates should be correct, no matter what format Base converts them to. It looks like Base is doing the sorting on a converted text string value as was suggested. One way to check this is to look at the Query that Base is generating to get the data from MySQL. If there is a "...SORT BY <date field>..." statement, then that statement should be examined to see if it is doing what you expect. However, Base could be doing the sorting instead of MySQL. What you might try is to create your own query, with the SORT BY date sort, and then base your form on that query. In this case, do not use the Base form sort in the form properties dialog. Another feature of using your own query is that you can experiment with different SQL options, where using the Base form sort property, you get what the Base designers give you - no choices.

Hope this helps.
Girvin Herr



Alex Thurgood wrote:
On 01/19/2013 05:59 PM, Ian Whitfield wrote:


Hi Ian,

Message No             Date
149                        01/01/13
 58                         02/01/13
150                        02/01/13
225                        02/01/13
261                        07/01/13
307                        18/01/13
148                        18/12/12  *
260                        18/12/12  *
318                        19/01/13
319                        19/01/13
306                        24/10/12  *

It doesn't matter how you set the format, valid dates in mysql take the
form of YYYY-MM-DD, so that is how you should enter them from Base,
otherwise you will get unexpected results because your data entry is
ambiguous, and mysql will interpret the date and the sorting mechanism
from the start of the string of characters making up the date.

If you enter the dates as YYYY-MM-DD, then the sort will operate correctly.


Alex





--
For unsubscribe instructions e-mail to: [email protected]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Reply via email to