12-09-2018, 09:58 AM | #1 |
Guru
Posts: 720
Karma: 228142
Join Date: Sep 2017
Location: Argentina
Device: moon+ reader, kindle paperwhite
|
Calculate reading time.
Hello, people could help me with this:
I have two custom columns with the read start date and the end date, I want to calculate the time. use days_between (field ('#fin'), field ('#ini')) but in the caampo it gives me back this synthesis, I leave screenshots in case I'm doing something wrong. Thank you. https://ibb.co/ZzBXZCk https://ibb.co/P5LJwqL https://ibb.co/5BnTkgX |
12-10-2018, 10:19 PM | #2 |
Guru
Posts: 720
Karma: 228142
Join Date: Sep 2017
Location: Argentina
Device: moon+ reader, kindle paperwhite
|
I keep turning this issue around, apparently it's how Caliber establishes it, but it does not work for me.
I will miss some complement? Last edited by BetterRed; 12-11-2018 at 12:02 AM. Reason: Upload oversize images to MR - PLEASE Read Guideline (link @ end of page) #9 |
Advert | |
|
12-11-2018, 07:36 AM | #3 |
Grand Sorcerer
Posts: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
You must put
Code:
program: |
12-11-2018, 05:32 PM | #4 | |
Guru
Posts: 720
Karma: 228142
Join Date: Sep 2017
Location: Argentina
Device: moon+ reader, kindle paperwhite
|
Quote:
Enviado desde mi ONEPLUS A3000 mediante Tapatalk Venia viajando y mi ingles no es muy bueno, perdón. Lo que he puesto es que en cuanto llegara a mi hogar lo probaria. Last edited by dunhill; 12-11-2018 at 10:01 PM. |
|
12-11-2018, 05:43 PM | #5 |
Grand Sorcerer
Posts: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Sorry, but the translation of your post (from Spanish? Portuguese?) makes no sense. Could you also post the original phrase in your language so we can try to figure out what you are really saying?
|
Advert | |
|
12-11-2018, 06:18 PM | #6 |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
@chaley: I assume he meant "I tried it here and it didn't work.
@dunhill: The following is working here: Code:
program: days_between(field('last_modified'),field('#last_seen')); And as an aside, I absolutely hate the fact that changing the template for a column changes the modified date for all books in the library. The same goes for adding a new column. Or even changing the column header. I've handled that in the source at home, but, I don't run from source on my work machine. |
12-11-2018, 06:25 PM | #7 | |
Grand Sorcerer
Posts: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
The rationale for changing the last modified date is to be sure that the backup OPF files are up to date. This is a rather complicated question, so the default is "any change requires a new backup". |
|
12-11-2018, 09:54 PM | #8 | ||
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
Quote:
From my point of view, if I add an extra column, then the backup OPF doesn't need to be updated until I populate it with a value. And the library backup status dialog has a button to "Queue all books for backup". Isn't it a matter of triggering that whenever a change is made? Except that it appears to work by changing the modified date for all books (ouch). But, it also appears to work based on the contents of the table "metadata_dirtied". I'm assuming that an entry is added to that table whenever book is modified. Finding another way to populate that after a custom column change, or pressing that button above should do what is desired. I'm sure it won't be as simple as that, but, it will be interesting to see what is needed. A lot of the frustration with this is that I have been involved in a lot of database migrations and changes over the years. What happens with the the created dates and last modified dates is always something that gets discussed. And frequently we have to do something to prevent them from being changed. |
||
12-11-2018, 10:10 PM | #9 |
Guru
Posts: 720
Karma: 228142
Join Date: Sep 2017
Location: Argentina
Device: moon+ reader, kindle paperwhite
|
@chaley
@davidfor I am reading your comments carefully. Thanks to run with the word program. It has been overlooked. several eyes see better than two. I have changed the format so that I do not get the result in decimals with this syntax: program: format_number (days_between (field ('#dateendded'), field ('# goodreadsstarted1')), "{0: 5.0f}") I must revise, similarly because with some dates it does not calculate me and they are loaded in the same way. Last edited by chaley; 12-12-2018 at 08:31 AM. Reason: Turn huge image into an attachment |
12-12-2018, 12:04 AM | #10 | |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
|
|
12-12-2018, 08:27 AM | #11 | |||
Grand Sorcerer
Posts: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Quote:
The only failure mode that I can think of that would cause the loss of custom columns is if the metadata_db_prefs_backup.json file is corrupt, missing the custom column definitions. If the entire file is missing then the column metadata is rebuilt from the OPF files. If "field_metadata" JSON inside the file is missing then the same thing happens. However, if the field_metadata field is there but missing the custom column metadata then the columns are lost. Quote:
|
|||
12-12-2018, 08:32 AM | #12 | |
Grand Sorcerer
Posts: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
12-12-2018, 02:10 PM | #13 |
Guru
Posts: 720
Karma: 228142
Join Date: Sep 2017
Location: Argentina
Device: moon+ reader, kindle paperwhite
|
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How does Kobo calculate reading statistics? | Mrs_Often | Kobo Reader | 24 | 10-30-2015 03:08 AM |
How does the kobo calculate book page counts? | howyoudoin | Kobo Reader | 6 | 01-07-2015 11:52 AM |
Is there any way to calculate page numbers better for H2O? | OrangeFlavored | Kobo Reader | 3 | 10-19-2014 06:10 PM |
I (almost) spend more time reading about e-readers than e-reading | Antoinekamel | General Discussions | 15 | 02-25-2013 10:48 AM |