Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 05-07-2015, 03:58 PM   #16
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Phssthpok View Post
The only issue I have now is that the result of all this is a string. Is there any way to turn it back into a datetime and format it nicely for display while sorting it only the underlying datetime value? datetime.strptime() would presumably do the trick if only I could import datetime somehow...

But this would just be the icing on the cake... as it is, your solution does exactly what I wanted. Thank you very much.
All composite custom columns (columns built from other columns) are in the end string values. However, if you set the column to sort by date, calibre will try to determine the underlying date and sort it correctly. For example, it will almost certainly recognize dd/mm/yy formatted dates, taking into consideration the locale to know whether the date is dd/mm or mm/dd.
chaley is offline   Reply With Quote
Old 05-09-2015, 01:36 PM   #17
Phssthpok
Age improves with wine.
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 558
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
Quote:
Originally Posted by chaley View Post
All composite custom columns (columns built from other columns) are in the end string values. However, if you set the column to sort by date, calibre will try to determine the underlying date and sort it correctly. For example, it will almost certainly recognize dd/mm/yy formatted dates, taking into consideration the locale to know whether the date is dd/mm or mm/dd.
Thank you, 'dd MMM yyyy hh:mm" sorts just fine when it's marked as a date.
Phssthpok is offline   Reply With Quote
Advert
Reply

Tags
library, sorting


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorting small ebooks in the library | Change the file size column to KB? Kartoffelr Library Management 7 04-12-2015 06:20 AM
Display date of file in library lalala987 Library Management 11 05-03-2014 05:23 AM
File sorting, by date cod123 Onyx Boox 1 09-06-2013 04:09 AM
Not Sorting by Date Added? Enriana Calibre 9 01-19-2013 11:21 AM
PRS-600 Sorting by date? maxbookworm Sony Reader 2 05-28-2010 04:40 PM


All times are GMT -4. The time now is 10:29 AM.


MobileRead.com is a privately owned, operated and funded community.