[SQL] Substracting Date field from integer value in another field

Поиск
Список
Период
Сортировка
От Abdul Hameed
Тема [SQL] Substracting Date field from integer value in another field
Дата
Msg-id CAOrYCUqNBOuz1zxmLFVqnDD7sNWccwku8ZTe3oT45vLFOV4m0g@mail.gmail.com
обсуждение исходный текст
Ответы Re: [SQL] Substracting Date field from integer value in another field
Список 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 по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: [SQL] Function Code
Следующее
От: Rene Romero Benavides
Дата:
Сообщение: Re: [SQL] Substracting Date field from integer value in another field