incrementing and decrementing dates by day increments programmatically

Поиск
Список
Период
Сортировка
От nzanella@cs.mun.ca (Neil Zanella)
Тема incrementing and decrementing dates by day increments programmatically
Дата
Msg-id b68d2f19.0310252035.17c31a2d@posting.google.com
обсуждение исходный текст
Ответы Re: incrementing and decrementing dates by day increments programmatically
Re: incrementing and decrementing dates by day increments
Re: incrementing and decrementing dates by day increments
Список pgsql-general
Hello,

I know that PostgreSQL, like most database management systems, has a
function
call called NOW() that returns the current date. Is there a way to
return a datein PostgreSQL such that the output is in ISO 8601 format
(Unix 'date -I' format)but such that the date is not "today"'s date
but the date two days ago or five
days ahead of now? I have tried something like NOW() + 5 but that did
not work
(because the data types are incompatible, and SELECT NOW() +
'0000-00-01' does
not work either. I get the error:

ERROR:  Bad interval external representation '0000-00-01'

Thanks,

Neil

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

Предыдущее
От: Lynn.Tilby@asu.edu
Дата:
Сообщение: Re: no records returned
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: [PERFORM] Slow performance with no apparent reason