Hi, I have two columns start_time & stop_time declared as "TIME". I'd like to compute the difference between the two times in seconds, all in db:

SELECT
  (CAST(stop_time AS SECONDS) + 86400 - CAST(start_time AS SECONDS))
  % 86400;

Unfortunately AS SECONDS causes parse error. Any hints? Thanks.

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

              http://www.postgresql.org/docs/faq

Reply via email to