| От | Tom Lane |
|---|---|
| Тема | Re: timestamp with timezone |
| Дата | |
| Msg-id | 434.1063411750@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | timestamp with timezone (Shankar K <shan0075@yahoo.com>) |
| Ответы |
Re: timestamp with timezone
|
| Список | pgsql-admin |
Shankar K <shan0075@yahoo.com> writes:
> some has centiseconds in them along with TZ. Now i'm
> wondering is there a way to just extract date and
> timestamp alone leaving the centisecods as well the TZ
> part.
You mean you want to round off to even seconds? Try date_trunc,
or cast to "timestamp(0) with time zone". To force stuff to be
rounded when it's stored, declare the column like that in the
first place.
regards, tom lane
В списке pgsql-admin по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера