View Single Post
Old 06-26-2019, 03:53 AM   #9
Soap-dodger
Member
Soap-dodger began at the beginning.
 
Soap-dodger's Avatar
 
Posts: 14
Karma: 10
Join Date: Dec 2016
Location: United Kingdom
Device: Amazon Kindle PaperWhite 3
Quote:
Originally Posted by davidfor View Post
To get an integer, you can use "format_number" with an appropriate format template.
You are so kind; your solution works excellently.

I am having difficulty in converting the result to an integer. I have read the relevant section of the Calibre manual to no avail. Here's what I've tried so far:

Code:
format_number(divide(words,pages), {0:3.0f});
format_number(divide(words,pages), "{0:3.0f}");
format_number(divide(words,pages), {0:,d});
format_number(divide(words,pages), "{0:,d}");
Either the manual could be clearer or I'm missing something.

Please, can you advise where I've got it wrong?
Soap-dodger is offline   Reply With Quote