Re: timestamp check
От | Raymond O'Donnell |
---|---|
Тема | Re: timestamp check |
Дата | |
Msg-id | 55A3C69C.7010104@iol.ie обсуждение исходный текст |
Ответ на | Re: timestamp check (Ramesh T <rameshparnanditech@gmail.com>) |
Список | pgsql-general |
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@gmail.com <mailto:david.g.johnston@gmail.com>> wrote: > > On Fri, Jul 10, 2015 at 8:54 AM, Ramesh T > <rameshparnanditech@gmail.com > <mailto:rameshparnanditech@gmail.com>>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@iol.ie
В списке pgsql-general по дате отправления: