05-27-2011, 10:17 PM | #1 |
Enthusiast
Posts: 40
Karma: 13888
Join Date: Sep 2010
Device: Kindle FireHD, Kindle3G, iPad, MacBook, iRex Illiad (ret)
|
Formatting Floating Point # Custom Column
Dear Very Helpful Calibre Community,
I may just be missing something really basic, but how do I format a column to force two digits after the decimal point? I have a floating point number column which truncates trailing zeros I would like to show. Thank you very much. |
05-30-2011, 04:01 PM | #2 |
Grand Sorcerer
Posts: 11,703
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
The latest release (0.8.3) provides a general mechanism for formatting numeric custom columns. There is a new box in the column definition for entering a format specifier to format the number. The tooltips in the column definition box provide a few examples.
Note that although the format specifier looks like a template, it is not. The template language also uses format specifiers, which is why they have a similar look. The format to do what you asked would be {0:.2f} |
Advert | |
|
06-03-2011, 05:25 PM | #3 |
Enthusiast
Posts: 40
Karma: 13888
Join Date: Sep 2010
Device: Kindle FireHD, Kindle3G, iPad, MacBook, iRex Illiad (ret)
|
THANK YOU, chaley. The new version [8.4 today] has a VERY easy fix for my exact issue. Your reply helped me so much.
GeekyGal |
06-03-2011, 05:34 PM | #4 |
Grand Sorcerer
Posts: 11,703
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
You are welcome.
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with Search - Floating Point Number | nynaevelan | Library Management | 16 | 04-13-2011 06:37 AM |
Can custom book data be displayed in a custom column? | kiwidude | Development | 9 | 03-02-2011 05:35 AM |
Need help with this custom Column. | Rie142 | Library Management | 2 | 02-20-2011 09:51 AM |
custom column i need a little help | shinken | Calibre | 3 | 09-15-2010 03:41 AM |
custom column not searchable | SkyDream | Calibre | 5 | 07-26-2010 05:38 AM |