Calculate hours between two dates (PostgreSQL)


I'm currently exploring Metabase and I'm trying to add a custom column that calculates the hours between Start and End Date. Do you have any advice on how to get started to achieve that?

Hi @marc
There's a request for having a function in Custom Expressions: - upvote by clicking :+1: on the first post

You would have to do that in SQL, since doing [End Date] - [Start Date] would return an interval/duration type, which cannot be visualized nicely: - upvote by clicking :+1: on the first post

Thanks @flamber
Found a way now to solve it.

@marc It would help others if you wrote what you did.

I just exported the data incl the time difference and did it Google Sheets :slight_smile:
Probably not very helpful for the successors.