View Single Post
Old 04-21-2017, 05:40 PM   #2
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,781
Karma: 30237628
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by sekhemty View Post
I have setup a column to evaluate the approximate time required to read a given book, it is a column generated from other columns, and it is based on the word count.

This is what I have done right now:

{#hours:'divide(field('#words'), 250)'}

it works fine, except that I'd like to remove or set a limited number of decimals; having this column say that I need 15 hours makes sense, I don't really need to know that it really is 15.632643
Assuming #hours is a floating point number, try setting the format in the column definition to something suitable - e.g. {:+.2f}.

Useful link ==>> Python String Format Cookbook

BR

Last edited by BetterRed; 04-21-2017 at 06:35 PM.
BetterRed is offline   Reply With Quote