Ingres SQL日期差 [英] Ingres SQL date difference

查看:102
本文介绍了Ingres SQL日期差的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要找到以分钟为单位的两个日期之间的差异。这是我一直在使用的选择语句:

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');

返回 -4分钟-21秒但我只想看4分钟。我在参考指南中找不到答案,不知道如何以我需要的格式显示它吗?

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?

推荐答案

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

您能试一下...不熟悉ingres

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

这篇关于Ingres SQL日期差的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆