Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Informix datetime: How to subtract 15 Minutes

How can I do this MySQL statement in an IBM Informix?

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

I tried this one in Informix, but it gave a syntax error.

select type, channel, teilnr, starttime, endtime, usedtime, host 
from online_time 
where starttime < subdate(CURRENT, INTERVAL "15" MINUTES)
order by starttime desc 
like image 913
LStrike Avatar asked Dec 19 '22 08:12

LStrike


1 Answers

select type, channel, teilnr, starttime, endtime, usedtime, host 
from online_time 
where starttime > (CURRENT - 15 UNITS MINUTE) 
order by starttime desc 
like image 165
LStrike Avatar answered Dec 28 '22 06:12

LStrike