| От | 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
Re: Query with time zone offset but without seconds |
| Список | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера