Em 13/02/15, Pedro B. Alves<[email protected]> escreveu:
> Pessoal, existe algo no PostgreSQL, que retorna a diferença em horas, entre
> duas datas?
>


SELECT (EXTRACT(EPOCH FROM '2015-02-13 17:00:00'::TIMESTAMP) -
EXTRACT(EPOCH FROM '2015-01-10 08:00:00'::TIMESTAMP)) / 3600;

http://www.postgresql.org/docs/current/interactive/functions-datetime.html

Osvaldo
_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a