How to calculate the sum of duration in a view ? I would like to know the total duration of an album after having entered the duration of each track on the disc. I use the Duration field and Views Aggregator Plus modules. The "duration" format is native in excel spreadsheets for example. Thank you in advance for your help.

  • Can you be more specific? Do you have 2 date fields and you're calculating duration or you're adding/substracting 2 date fields? Feb 2 at 2:48
  • I think they want to sum floating point numbers that represent time durations.
    – cilefen
    Feb 2 at 4:08
  • 57:00 + 3:05 = 1:00:05
    – cilefen
    Feb 2 at 4:09
  • Yes @cilefen, I want to sum time duration (not date) like MM:SS + HH:MM:SS
    – Jipi
    Feb 2 at 9:38
  • I highly doubt you'll find a solution without writing your own custom code. This module stores the duration as a ISO8601 duration string, and as far as I know SQL databases (and therefore views module) don't know how to handle those strings.
    – Hudri
    Feb 2 at 9:54


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.