View Single Post
Old 08-22-2022, 04:42 PM   #1
astarinlife
Member
astarinlife doesn't litterastarinlife doesn't litter
 
astarinlife's Avatar
 
Posts: 12
Karma: 132
Join Date: Aug 2011
Device: Kindle Voyage, Kindle Paperwhite
Help Formatting Custom Column

I built a custom column and got that to do what I intended but the resulting number is probably 15 to 20 digits long. I'm trying to shorten it to just one digit after the decimal (0.1). I have two sets of code that do what I want that I will post in case one works better with formatting. I've looked around to try figuring it out and it seems like {0:.1f} should do what I want, but I have no clue where it would go. Any help is greatly appriciated!
Code:
{#kudos:'divide(multiply($, 100), field('#hits'))'}

program:
	kudos = field('#kudos');
	hits = field('#hits');
	percent = multiply(kudos, 100);
	divide(percent, hits);
astarinlife is offline   Reply With Quote