From: | Michael Glaesemann <grzm(at)myrealbox(dot)com> |
---|---|
To: | Judith Altamirano Figueroa <jaltamirano(at)correolux(dot)com(dot)mx> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: date question |
Date: | 2005-11-03 17:22:24 |
Message-ID: | 492564A9-C512-411D-BAC6-D48693CEDFA0@myrealbox.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Nov 4, 2005, at 1:17 , Judith Altamirano Figueroa wrote:
> 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()??
You can try a couple of different things: one is to use CURRENT_DATE
- 1 instead of now() -1. Another would be to cast now() to date,
e.g., now()::date - 1.
Hope this helps.
Michael Glaesemann
grzm myrealbox com
From | Date | Subject | |
---|---|---|---|
Next Message | lucas | 2005-11-03 17:22:29 | Re: date question |
Previous Message | Judith Altamirano Figueroa | 2005-11-03 16:17:52 | date question |