Quote:
Originally Posted by davidfor
It really depends on what the purpose of these columns are. I think that your current "Finished" column is a manual copy of what is in the "Kobo Last Read TimeStamp" column and which was retrieved from the device. If that is the case, then replacing the "Finished" column with the column with the template is what I would do. This is basically what I do. While all the columns have "kobo" in the name, if I read something elsewhere, I manually fill in the columns. And I might push the status to the ereader.
If the current "Finished" column also has timestamps that came from other reading methods, then you need to decide if you want to keep that separate from the Kobo timestamp. If you don't, then I would copy the values in "Finished" column to the Kobo timestamp column. Then I would replace the "Finished" column with the template column.
If you do want to keep these separate, then we could come up with a template that showed one of the timestamps. Exactly what that would be depends on what the expected combinations of values are and which takes preference. For example:
Code:
program:
kobo_date = cmp($$#kobo_percent_read, 100, '', $$#kobo_last_read, $$#kobo_last_read);
cmp(days_between($$#finished, kobo_date), 0, format_date(kobo_date,'dd MMM yyyy'), format_date($$#finished,'dd MMM yyyy'), format_date($$#finished,'dd MMM yyyy'));
That would use the latest of either of the two dates and only use the Kobo timestamp if the book is finished.
|
My apologies for the confusion. I only wish to have one "Finished" column that displays the date when the book is finished (100%).
I tried replacing the code with what you provided in your first reply and it deleted
all the previously existing dates (a result of a convoluted method I was using). Then I tried the code above and it placed an entry in every book in my library with
BAD DATE. I stumbled upon the template editor and a few things were highlighted in blue, if that means anything. (see screenshot).
To keep it simple, all I am trying to create is one column, with a single entry of dd MMM yyyy when a book is finished and I connect a device to Calibre.
The first three fields are:
Lookup name: finished
Column heading: Finished
Column type: Column built from other columns
Thank you for your assistance. So close, but not quite there.