View Single Post
Old 06-01-2020, 11:41 PM   #5
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
@tamarissa: Neither mine or @chaley's solutions were complete. Both were just getting the date for a format in the easiest way we could. They needed more work based on what you were trying to do. And, the issue you seemed to be having was getting the modified date for the format. I think we both thought the next step was obvious.

In any case, the following will produce just the date:

Code:
{:'list_item(list_item(list_re(formats_modtimes('yyyy-MM-dd'), ',', '^(EPUB|AZW).*', ''),0,','),1,':')'}
And in the definition of the column, you need to set the value of the option "Sort/search column by" to "Date". With this, I can do a search on the column as a date.

But, I'm not sure of what the point is. What are you planning to do with this date? Sure, you can search on it or sort by it, but, what will that achieve? About the only thing I can see to use it for is to look for all books where the format is older than calibres modified date and then do an Embed metadata on them. That will update the formats that calibre can do this for, but, I don't see the point in doing this. If you export the book, either via save-to-disk or send-to-device, the metadata is updated in the copy produced. Unless you are doing something else with the book in the library, I don't see the point of doing this. Asking what you are doing is partly curiosity. But, there might be a better way to do what you want to do. Or possibly no way to do it all.

Also, I can't quickly see how to get the oldest date of the formats. My code above just takes the first in the list. I think that is the format first added to the book, but, it I'm not sure. And if it is, then it might have have been modified so that doesn't have the oldest modified date. Or have been modified for a reason different to what you are trying to track, but, still needs those changes.
davidfor is offline   Reply With Quote