datetime - Informix 日期时间 : How to subtract 15 Minutes

标签 datetime intervals informix

如何在 IBM Informix 中执行此 MySQL 语句?

select type, channel, teilnr, starttime, endtime, usedtime, host 
from online_time 
where starttime < DATE_SUB(NOW(),INTERVAL 15 MINUTE)
order by starttime desc 

我在 Informix 中尝试了这个,但它给出了一个语法错误。
select type, channel, teilnr, starttime, endtime, usedtime, host 
from online_time 
where starttime < subdate(CURRENT, INTERVAL "15" MINUTES)
order by starttime desc 

最佳答案

select type, channel, teilnr, starttime, endtime, usedtime, host 
from online_time 
where starttime > (CURRENT - 15 UNITS MINUTE) 
order by starttime desc 

关于datetime - Informix 日期时间 : How to subtract 15 Minutes,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42767316/

相关文章:

c++ - 从 boost::icl::interval_set 中删除离散闭区间

sql - 在 Informix 中使用 sysmaster 用户连接时如何获取特定数据库的表列表?

sql - 以 15 分钟的间隔生成系列,但每隔一周跳过一次

swift - RxSwift 间隔(定时器)在后台

java - 使用 JDBC 执行多个 SQL 语句 (CRUD)

java - informix中如何避免锁异常

C# 自定义 DateTime.ParseExact 日期字符串

C# .net 日期时间到整数值

sql - 为什么 LEFT(Datetime,1) 给我 "J"?

C# : Why is my SqlDateTime. MinValue 在不同的机器上不同?