Query with time zone offset but without seconds

Поиск
Список
Период
Сортировка
От Marco
Тема Query with time zone offset but without seconds
Дата
Msg-id 4d8ccb78$0$7652$9b4e6d93@newsspool1.arcor-online.net
обсуждение исходный текст
Ответы Re: Query with time zone offset but without seconds  (Steve Crawford <scrawford@pinpointresearch.com>)
Re: Query with time zone offset but without seconds  (Adrian Klaver <adrian.klaver@gmail.com>)
Список pgsql-general
I have a column »timestamp with time zone«. I want to extract the date/time in
a different format including the time zone offset in a query but without
seconds. If I do

  select to_char(datetime, 'YYYY-MM-DD HH24:MI') from table;

then the time zone offset is missing in the output: 2011-03-25 18:01
If I do

  select date_trunc( 'minute', datetime) from table;

then the time zone offset is present, but the seconds are not removed:
2011-03-25 18:01:00+01

I want it to look like this: 2011-03-25 18:01+01

How to do that?


Marco


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

Предыдущее
От: Emre Hasegeli
Дата:
Сообщение: Re: which view is used another views
Следующее
От: Marco
Дата:
Сообщение: Re: Need help for constructing query