#1
|
|||
|
|||
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 |
#2
|
||||
|
||||
you're right, that's strange
|
#3
|
|||
|
|||
Quote:
Thanks for your confirmation. I discovered it by accident while creating a timeline using yyyy.mm.dd as the item title. Armstrong |
#4
|
|||
|
|||
Download the attached file, extract and double-click DisableSortDateNumericInTree.reg, and restart UR.
|
#5
|
|||
|
|||
Quote:
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. |
#6
|
|||
|
|||
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). |
#7
|
|||
|
|||
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. |
#8
|
|||
|
|||
UR doesn't -- Windows does, based on the date settings in Regional and Language options in the Control Panel.
|
#9
|
|||
|
|||
Thanks.
|
|
|