Quote:
Originally Posted by Phssthpok
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.