On 11/07/2015 17:11, Ramesh T wrote: > okay,i'm executing a query from pgadmin3. > > i want display time with timezone.But above query displaying date and > time not timezone... > > On Sat, Jul 11, 2015 at 9:34 PM, David G. Johnston > <david.g.johnston@xxxxxxxxx <mailto:david.g.johnston@xxxxxxxxx>> wrote: > > On Fri, Jul 10, 2015 at 8:54 AM, Ramesh T > <rameshparnanditech@xxxxxxxxx > <mailto:rameshparnanditech@xxxxxxxxx>>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..? Hi there, This question was answered a few days ago, but perhaps you didn't see it. The reason you don't get timezone information is that subtracting two timestamps results in an interval value. See table 9-27 on this page: http://www.postgresql.org/docs/9.4/static/functions-datetime.html Also, please don't top-post; the convention on this list is to bottom-post. Thanks! :-) Ray. -- Raymond O'Donnell :: Galway :: Ireland rod@xxxxxx -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general