Ingres SQL date difference

耗尽温柔 提交于 2020-01-17 06:30:53

问题


I need to find the difference between two dates in minutes. Here is the select statement I have been using:

 select date ('05.04.2017  11:12:00') - date('now');

It is returning -4 mins -21 secs but I want to see just 4 minutes. I could not find the answer in the ref guide, any idea how to show it in the format I need?


回答1:


http://ariel.its.unimelb.edu.au/~yuan/Ingres/us_13229.html

can you give this a shot... not familiar with ingres

select    INTERVAL('mins','today'-date('05.04.2017  11:12:00'))

http://www.r20.nl/TheSQLGuidetoIngres-AppendixB.pdf



来源:https://stackoverflow.com/questions/43219383/ingres-sql-date-difference

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!