Re: date question

Поиск
Список
Период
Сортировка
От lucas@presserv.org
Тема Re: date question
Дата
Msg-id 20051103142229.d5bfubfxu8mc0cc0@www.presserv.org
обсуждение исходный текст
Ответ на date question  (Judith Altamirano Figueroa <jaltamirano@correolux.com.mx>)
Список pgsql-sql
Quoting Judith Altamirano Figueroa <jaltamirano@correolux.com.mx>:
> Hi everybody, in Postgres 7.0.2 I have the next query:
> SELECT * from clientes_proceso where fecha_mod::date <= now() -1;
> but in version 8.0.1 returns the next error:
> ERROR: The operator doesn't exist: timestamp with time zone - integer
> How can drop a day to now()??

Try using "now()::date", or "interval". Like: select * from clientes_proceso where fecha_mod::date <= now()::date -1;
or: select * from clientes_proceso where fecha_mod::date <= now() - '1
day'::interval;
---
Lucas



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

Предыдущее
От: Judith Altamirano Figueroa
Дата:
Сообщение: date question
Следующее
От: Michael Glaesemann
Дата:
Сообщение: Re: date question