On 10/07/2015 13:54, Ramesh T wrote:
>
> select current_timestamp-to_timestamp(to_char(current_date,'YYYY-MM-DD
> HH24'||':'||'MI'||':'||'SS')||' '||(SELECT utc_offset FROM
> pg_catalog.pg_timezone_names
> WHERE name='US/Eastern'),'YYYY-MM-DD
> HH24'||':'||'MI'||':'||'SS')::timestamptz;
>
> it's not displaying timezone..any help..?
>
Because TIMESTAMPTZ - TIMESTAMPTZ = INTERVAL, not TIMESTAMPTZ.
Also, why on earth are you doing all those string concatenations in the
to_char() calls? Why not just do to_char(..., 'YYYY-MM-DD H24:MI:SS')?
Ray.
--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie