Better Support for Duration (HH:MM:SS Values). Currently Only treated as Time Of Day

Im not sure if this should be filed under bug or feature request.

The Bug Portion:
I have a query that returns a duration of time in HH:MM:SS format. I have found that Metabase treats this as a time of day instead of a duration of time (understandably so, but limiting). So, if a particular row has a duration longer than 24 hours… a javascript error is thrown: “java.sql.SQLException: Illegal hour value ‘72’ for java.sql.Time type in value '72:55:00.”

The Feature Request:
It seems like it would be really helpful to add in some additional GUI-goodies to handle time and dates. For example, I would love to be able to take two dates and calculate the difference in a custom column. I realize i can do this if the dates are in seconds) but it would still then be in a format different from what I’d like. This would also allow me to use the built in table relationship settings that custom queries do not seem to have access to.

In addition, it would be awesome to be able to Average a time duration like you can with other numbers.

Please let me know if these things already exist and I’m simply using it wrong. :slight_smile:


@jakegarrison, did you get a workaround to this?

@luthervdh There's currently no workaround for this, but there's a request open for it: - upvote by clicking :+1: on the first post

thanks @flamber