Skip to content
Advertisement

how to convert integer minutes to interval in postgres

I’m trying to convert minutes which are in integer to interval in postgres

Is there any function that will help me to convert it to interval or should i have divide it by 60 and get the final result

Advertisement

Answer

Fastest way is with make_interval

So it looks like this (as suggested by @Teddy)

or,

Not to say that’s the cleanest, if speed isn’t an issue I prefer the * method @a_horse_with_no_name mentioned

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement