Quote:
Originally Posted by quarkpott
Hello,
Maybe someone can help me.
I have a Read Start column and a Read End column. How can I create a read duration column that shows the days between the two dates? How can I create a read duration column that shows the days between the two dates?
I need a column that depends on other columns, but then unfortunately I do not get more.
I would be very glad about help.
|
See
The calibre template language,
General Program Mode, and in particular the
days_between() function.
You probably want a template like this, with the lookup names changed appropriately.
Code:
program:
days_between($$#read_end, $$#read_start)
The days_between() function returns fractional days. If you want an integer then use either
Code:
program:
floor(days_between($$#read_end, $$#read_start))
Code:
program:
round(days_between($$#read_end, $$#read_start))