![]() |
#1 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 156
Karma: 10001
Join Date: Feb 2011
Device: sony
|
Question about date sorting
If I understand correctly ...
The "Date" (date added) column sorts on the underlying datetime, not on the visible date. But sometimes I want to use this in a nested sort, say Title within Author within Date -- which doesn't work, because I'll just get everything sorted by Date to the (milli)second. I created a composite column ("{date}"), and that sorted nicely, but I took a whopping performance hit (see here ). So I'm wondering if I overlooked an option that doesn't require the use of a composite column ... |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,740
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Regarding your post in the date-changed thread: I have an implementation that sorts dates as displayed. The performance penalty is not huge. For a 20,000 book library, the time to sort by a date column went from approximately 1/2 second to 1 second, or some 500 microseconds per book. This is consistent with my mark 1 eyeball estimate of the cost of trimming the date.
Next step is for Kovid to look at it. I might have done something stupid, he might have some suggestions for improvement, or he might object to the principle for a reason I haven't thought of. One note: the sort will respect strange display templates and do something. If your display template is, for example yyyy/ss, then the month, day, hour, and minute will be filled in with a constant. The results could easily not be what you expect. Continuing the example, 2011/10/25 19:08:10 and 2011/01/19 10:10:10 will sort as equal because the years (2011) and the seconds (10) match. Last edited by chaley; 11-08-2011 at 02:53 PM. Reason: fix typo pointed out by starson17 |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
|
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,740
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,740
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
See http://www.urbandictionary.com/defin...=Neener-neener. No idea what the etymology is.
|
![]() |
![]() |
![]() |
#7 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 156
Karma: 10001
Join Date: Feb 2011
Device: sony
|
![]() That makes a lot of sense -- and saves me a big perfomance hit since I don't have to use a composite column! p.s. I'd already quoted it but got distracted while you fast fingered guys chatted ![]() |
![]() |
![]() |
![]() |
#8 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Quote:
![]() |
||
![]() |
![]() |
![]() |
#9 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,740
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
The change mentioned in post #2 will be in the next release. Users must change a tweak to enable it.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
360 Plus sorting question | tponzo | PocketBook | 3 | 08-04-2011 10:30 AM |
Sorting books by Date Purchased in iBooks | solitaire | Devices | 6 | 06-16-2011 05:44 AM |
Sorting Forum Threads by Original Post Date? | JBrondos | enTourage Archive | 4 | 03-24-2011 09:05 AM |
PRS-600 Sorting by date? | maxbookworm | Sony Reader | 2 | 05-28-2010 04:40 PM |
Sorting by date in Calibre | poco06 | Calibre | 3 | 02-03-2010 12:00 PM |