[SQL] Substracting Date field from integer value in another field - Mailing list pgsql-sql

From Abdul Hameed
Subject [SQL] Substracting Date field from integer value in another field
Date
Msg-id CAOrYCUqNBOuz1zxmLFVqnDD7sNWccwku8ZTe3oT45vLFOV4m0g@mail.gmail.com
Whole thread Raw
Responses Re: [SQL] Substracting Date field from integer value in another field  (Rene Romero Benavides <rene.romero.b@gmail.com>)
List pgsql-sql

Getting below error.


ERROR:  operator does not exist: timestamp with time zone - bigint

LINE 65: ACS_TIMESTAMP-acct_session_time/(24*60*60) ELSE ACS_TIMESTAM..



I have a table with one column as  timestamp (Logon Time), another column as integer(seconds).

I would like to deduct the logon time(timestamp) – integer field(seconds) to get the final value in TIMESTAMP format.


SELECT ACS_TIMESTAMP - acct_session_time   FROM RADIUS_ACC_48


ERROR:  operator does not exist: timestamp with time zone - bigint

LINE 65: ACS_TIMESTAMP-acct_session_time/(24*60*60) ELSE ACS_TIMESTAM..


Please let me know the syntax for that.

pgsql-sql by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: [SQL] Function Code
Next
From: Rene Romero Benavides
Date:
Subject: Re: [SQL] Substracting Date field from integer value in another field