Adding a date and an interval...

Поиск
Список
Период
Сортировка
От Ian Harding
Тема Adding a date and an interval...
Дата
Msg-id sb0933d5.041@emgateways.co.pierce.wa.us
обсуждение исходный текст
Список pgsql-general
Why does this happen?  When I do this,

select cast('10/28/01' as date) + cast('1 day' as interval);

I get 2001-10-28 23:00:00-08, when I expect 2001-10-29 etc.  I am using this in a loop in a pltcl function.

I know this is the end of daylight savings, but I assumed 1 day is not always 24 hours if the DB knows about daylight
savings.

How should I go about consistently stepping through the days of the year?

Thanks!!

Ian A. Harding
Programmer/Analyst II
Tacoma-Pierce County Health Department
(253) 798-3549
mailto: ianh@tpchd.org


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

Предыдущее
От: Justin Clift
Дата:
Сообщение: Re: how to install postgresql
Следующее
От: Paul Tomblin
Дата:
Сообщение: Re: Why can't I do this (setup question)