08-21-2024, 08:55 AM | #1 |
Enthusiast
Posts: 32
Karma: 10
Join Date: Nov 2011
Device: none
|
Format-Code for columns with numbers
Hello,
I want to create two individual columns, but I just can't handle the format for numbers. One column should show numbers with a decimal comma (e.g. 4,5). I would choose floating point as the column type. The second column should represent integers with a point separating the thousands. What do I have to enter as the format code in each case to get the desired display? Many thanks in advance for any help! Last edited by Massreader; 08-21-2024 at 09:10 AM. |
08-21-2024, 10:26 AM | #2 |
Well trained by Cats
Posts: 30,440
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Right click that columns header: Edit custom column: (see image)
This uses Python formatting rules (link is in the dialog box) |
Advert | |
|
08-21-2024, 04:32 PM | #3 |
want to learn what I want
Posts: 1,245
Karma: 6426810
Join Date: Sep 2020
Device: Calibre E-book viewer
|
|
08-21-2024, 04:54 PM | #4 | |
want to learn what I want
Posts: 1,245
Karma: 6426810
Join Date: Sep 2020
Device: Calibre E-book viewer
|
Quote:
And I think you need to be using a compatible locale, I mean, the Calibre UI language, such as German, seems relevant in order to allow manual inputs with the comma instead of dot/point. If you have English as the Calibre UI language, you can insert manually 4 point 5 (not 4 comma 5), but in Book Details that number will still show as 4,5. According to https://docs.python.org/3/library/st...-string-syntax : 'n' - Number. This is the same as 'g', except that it uses the current locale setting to insert the appropriate number separator characters. Last edited by Comfy.n; 08-21-2024 at 05:06 PM. |
|
08-24-2024, 12:14 PM | #5 |
Enthusiast
Posts: 32
Karma: 10
Join Date: Nov 2011
Device: none
|
Thank you very much!
It works. :-) |
Advert | |
|
08-24-2024, 03:42 PM | #6 |
want to learn what I want
Posts: 1,245
Karma: 6426810
Join Date: Sep 2020
Device: Calibre E-book viewer
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Auto registration of new custom columns from plugin code [question/feature request]] | Sud0 | Development | 4 | 12-06-2023 02:57 AM |
Ordinal numbers in custom columns (1st, 2nd, 3rd etc) | Luiztfc | Library Management | 5 | 06-16-2023 03:09 PM |
Bullet,numbers, indents and alignment greyed out in code view. | handycrowd | Sigil | 4 | 02-13-2018 03:29 AM |
Need help in Custom Columns, template syntax, and rounding numbers | dennocoil | Calibre | 0 | 07-10-2017 03:24 PM |
Strange Code Replaces Numbers | Gwaredd | Conversion | 1 | 07-23-2013 12:03 PM |