Query with time zone offset but without seconds - Mailing list pgsql-general

From Marco
Subject Query with time zone offset but without seconds
Date
Msg-id 4d8ccb78$0$7652$9b4e6d93@newsspool1.arcor-online.net
Whole thread Raw
Responses 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>)
List 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 by date:

Previous
From: Emre Hasegeli
Date:
Subject: Re: which view is used another views
Next
From: Marco
Date:
Subject: Re: Need help for constructing query