Subtrair hora do Timestamp
02/08/2013
0
SELECT ACE_DATAHOTA
FROM ACESSOS
WHERE ACE.ACE_DATAHORA >= CURRENT_TIMESTEMP - CAST('00:15:00' AS TIME)
Firebird 2.1
Tiago Soares
Posts
02/08/2013
Deivison Melo
Veja esses artigos, tenho certeza que irá ajudá-lo.
http://edn.embarcadero.com/article/33724
https://www.devmedia.com.br/forum/timestamp-firebird/366200
http://www.arquivodecodigos.net/dicas/firebird-aprenda-a-usar-os-tipos-de-dados-date-time-e-timestamp-do-firebird-3252.html
02/08/2013
Junior Miranda
SELECT cast(cast(current_timestamp as time) - 4500 as timestamp) FROM rdb$database
Converta o total de minutos em segundos.
[]´s
02/08/2013
Tiago Soares
02/08/2013
Tiago Soares
Eu fiz assim:
ACE.ACE_DATAHORA >= DATEADD(HOUR, - EXTRACT(HOUR FROM CAST('01:15:20' AS TIME)), DATEADD(MINUTE, - EXTRACT(MINUTE FROM CAST('01:15:20' AS TIME)), DATEADD(SECOND, - EXTRACT(SECOND FROM CAST('01:15:20' AS TIME)), CURRENT_TIMESTAMP)))
SELECT CURRENT_TIMESTAMP, DATEADD(HOUR, - EXTRACT(HOUR FROM CAST('01:15:00' AS TIME)), DATEADD(MINUTE, - EXTRACT(MINUTE FROM CAST('01:15:00' AS TIME)), DATEADD(SECOND, - EXTRACT(SECOND FROM CAST('01:15:00' AS TIME)), CURRENT_TIMESTAMP))) FROM rdb$database
Fica a dica.
Caso alguém saiba uma solução melhor posta ai.
Clique aqui para fazer login e interagir na Comunidade :)