Re: Timezone template for to_char(timestamp, '...')?

Поиск
Список
Период
Сортировка
От Thomas Lockhart
Тема Re: Timezone template for to_char(timestamp, '...')?
Дата
Msg-id 395CA2DA.5A19079A@alumni.caltech.edu
обсуждение исходный текст
Ответ на Re: Timezone template for to_char(timestamp, '...')?  (Karel Zak <zakkr@zf.jcu.cz>)
Список pgsql-general
> >       to_char(timestamp, 'Dy @MM:MIAM, Mon DD, YYYY')
> > to format a timestamp and its works fine except I'd like to add the
> > timezone (EDT etc) to the end.

Well, if you *really* need it:

  set datestyle = 'postgres';
  set time zone 'PST8PDT';
  select to_char(timestamp 'now' , 'Dy @MM:MIAM, Mon DD, YYYY')
   || ' '
   || substring(timestamp 'now' from char_length(timestamp 'now')-2);
--------------------------------
 Fri @06:35AM, Jun 30, 2000 PDT
(1 row)

                      - Thomas

В списке pgsql-general по дате отправления:

Предыдущее
От: Guillaume Perréal
Дата:
Сообщение: Re: pg_dumpall and check constraints
Следующее
От: Philip Warner
Дата:
Сообщение: Re: pg_dumpall and check constraints