| От | Bruno Wolff III |
|---|---|
| Тема | Re: How to convert 3 colums to timestamp with timezone |
| Дата | |
| Msg-id | 20041003234243.GB24542@wolff.to обсуждение исходный текст |
| Ответ на | How to convert 3 colums to timestamp with timezone (Jens Arnfelt <jens.arnfelt@cuatro.dk>) |
| Список | pgsql-sql |
On Sun, Oct 03, 2004 at 22:50:13 +0200, Jens Arnfelt <jens.arnfelt@cuatro.dk> wrote:
> Hi There!
>
> Hope this is an easy one :-D
>
> How do I convert 3 individuel colums with type "date", "time" and
> "integer" to at timestamp with timexone?
>
> eg. tabel
> cStartUnixtime cStartTime cStartZone
> 09-24-2004 10:27:12 -2
>
> This I have to present as an timestamp with timezone.
You can add the date and time to get a timestamp and then use AT TIME ZONE
with the second argument being the integer times an interval of 1 hour.
Sort of like the following:
bruno=> select ('2004-9-24'::date + '10:27:12'::time) at time zone (-2 * '1 hour'::interval); timezone
------------------------2004-09-24 07:27:12-05
(1 row)
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера