Quote:
Originally Posted by chaley
Calibre doesn't support duration as a column type. Using integer is the best solution. The input should be formatted as the number of seconds. For example, 00:14:16 ==> 14 minutes + 16 seconds ==> 856 seconds
You can use a column built from other columns to display the number of seconds however you wish. For example, this template displays the number of seconds (I used a constant instead of the correct column lookup name) as hh:mm:ss
Code:
program:
number_of_seconds = 856;
hours = floor(number_of_seconds/3600);
minutes = floor((number_of_seconds - (hours * 3600))/60);
seconds = mod(number_of_seconds, 60);
format_number(hours, '02d') & ':' & format_number(minutes, '02d') & ':' & format_number(seconds, '02d')
Note that you couldn't edit the value shown in the column built from other columns. You must edit the number_of_seconds column
|
Danke für deinen Vorschlag, habe Ihn wie folgt übernommen!
2 neue Spalten angelegt:
1. Spalte = aus anderen Spalten aufgebaute Spalte = #länge
2. Spalte = Ganzzahlen = #sekunden
Wie gelingt mir der Verweis auf die selbst definierte Spalte:"#sekunden"?
Vielen Dank