sql - Justify seconds (integer number) to date format (more than days and months) in PostgreSQL -


i know how can justify big number (million of seconds) date format hh:mm:ss , days : months : year in same time. using sql query in postgresql 9.4

example : 1 000 000 seconds = 11 days 13 hours 46 minute 40 seconds.

thank you

test=> select justify_hours(interval '1000000 s'); ┌──────────────────┐ │  justify_hours   │ ├──────────────────┤ │ 11 days 13:46:40 │ └──────────────────┘ (1 row) 

you can use justify_interval instead of justify_hours months , years, how many days there in month?


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -