Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to convert days to minutes

Need to convert the output from below to minutes:

example query:

SELECT 
  avg(date - create_date)
FROM x

example outputs – need to be converted into minutes:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

20 days 24:22:59.328877
1 day 16:30:18.131138
5 days 16:46:54.355619

>Solution :

Extract epoch to get seconds, then divide by 60:

select
    extract(epoch from avg(date - create_date)) / 60 as avg_minutes
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading