Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [UR] General Discussion (https://www.kinook.com/Forum/forumdisplay.php?f=23)
-   -   Data Explorer Sorting Anomaly (https://www.kinook.com/Forum/showthread.php?t=4652)

armsys 09-06-2010 05:21 AM

Data Explorer Sorting Anomaly
 
On the Data Explorer pane, sorting will fail after the 2nd period. For example:
2010.07.01
2010.01.03
2010.03.01
2010.07.05
2010.09.07
2010.10.02
2010.02.03
2010.03.05

The sorting works fine for the months but fails for the days, regardless manual or automatic.
Armstrong

quant 09-06-2010 07:40 AM

you're right, that's strange

armsys 09-06-2010 07:45 AM

Quote:

Originally posted by quant
you're right, that's strange
Quant,
Thanks for your confirmation. I discovered it by accident while creating a timeline using yyyy.mm.dd as the item title.
Armstrong

kinook 09-06-2010 01:24 PM

1 Attachment(s)
Download the attached file, extract and double-click DisableSortDateNumericInTree.reg, and restart UR.

armsys 09-06-2010 05:37 PM

Quote:

Originally posted by kinook
Download the attached file, extract and double-click DisableSortDateNumericInTree.reg, and restart UR.
Hi Kinook,
Thanks for your fast help. Yes, your solution works brilliantly.
May I know the technical effects of EnableSortDateNumericInTree.reg and DisableSortDateNumericInTree.reg? That's, uf Date Numeric Tree is disabled, how would affect sorting of other item titles?

2010.09.10, for example, is just like any text string. Why does UR treat it as a date?

Thank you.

kinook 09-07-2010 06:54 AM

If the sort option is enabled (default behavior), when sorting in the tree, UR first attempts to convert the values to dates (using the Windows VarDateFromBstr API) and performs a date comparison if conversion succeeds, otherwise it converts the values to numbers and performs a numeric sort if the values look like numbers.

If the sort option is disabled, or the above fails, a regular string comparison is used (using lstrcmp).

armsys 09-07-2010 08:29 AM

Kinook,
Thanks for the enlightenment. The itching question here: how could UR discern the various date formats around the world?
yyyy.mm.dd
mm/dd/yyyy
dd/mm/yy
...etc.

I thought all item titles are assumed char string data type.
In UR, it turns out to be a data data type.

Thanks for allowing us to know more the technical details of the UR.

kinook 09-07-2010 09:00 AM

UR doesn't -- Windows does, based on the date settings in Regional and Language options in the Control Panel.

armsys 09-07-2010 09:11 AM

Thanks.


All times are GMT -5. The time now is 08:34 AM.


Copyright © 1999-2023 Kinook Software, Inc.