Re: [SQL] date question

2005-11-03 Thread Michael Glaesemann
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 - inte

Re: [SQL] date question

2005-11-03 Thread lucas
Quoting Judith Altamirano Figueroa <[EMAIL PROTECTED]>: 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 c

[SQL] date question

2005-11-03 Thread Judith Altamirano Figueroa
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()??

Re: [SQL] date question

2003-06-22 Thread Bruno Wolff III
On Fri, Jun 20, 2003 at 19:33:35 +0200, javier garcia - CEBAS <[EMAIL PROTECTED]> wrote: > Hi all; > > Peter, thank you very much for your help. Just a little thing. I've done as > you say: > > CREATE TABLE rain_series_dated AS SELECT (year * interval '1 year' + month * > interval '1 month' +

Re: [SQL] date question

2003-06-21 Thread javier garcia - CEBAS
Hi all; Peter, thank you very much for your help. Just a little thing. I've done as you say: CREATE TABLE rain_series_dated AS SELECT (year * interval '1 year' + month * interval '1 month' + day * interval '1 day') AS fecha,est7237,est7238,est7239,est7250 FROM rain_series ORDER by fecha; I se

Re: [SQL] date question

2003-06-17 Thread Peter Eisentraut
javier garcia - CEBAS writes: > Is there a way to create a table from this table, directly in Postgres in > which a date field is created based in the values of "year", "month", "day" > in this table? year * interval '1 year' + month * interval '1 month' + day * interval '1 day' This results in

Re: [SQL] date question

2003-06-16 Thread Bruno Wolff III
On Fri, Jun 13, 2003 at 13:44:09 +0200, javier garcia - CEBAS <[EMAIL PROTECTED]> wrote: > > And I've got another related tables with a date field. I need to compare the > dates field in the other tables with "year", "month", "day" in this table. > > Is there a way to create a table from this

[SQL] date question

2003-06-16 Thread javier garcia - CEBAS
Hi; I've got a table in the way: year | month | day | est7237 | est7238 | est7239 | est7250 --+---+-+-+-+-+- 2002 | 9 | 1 | | | | 2002 | 9 | 2 | | | | 2002 | 9 | 3 | |

Re: [SQL] Date question

2001-03-06 Thread clayton cottingham
Francis Solomon wrote: > > Hi Boulat, > > stasis=# select (now() + '1 year')::date; > ?column? > > 2002-03-06 > (1 row) > > Hope this helps > > Francis > > > Hi, > > > > Im a little bit stuck here. > > > > Does anyone know how to get date in format '-MM-DD' of a date one >

Re: [SQL] Date question

2001-03-06 Thread Jie Liang
you can say: (now() + '1year'::timespan)::date Jie LIANG St. Bernard Software 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.stbernard.com www.ipinc.com On Tue, 6 Mar 2001, Boulat Khakimov wrote: > Hi, > > Im a little bit stuck here.

RE: [SQL] Date question

2001-03-06 Thread Francis Solomon
Hi Boulat, stasis=# select (now() + '1 year')::date; ?column? 2002-03-06 (1 row) Hope this helps Francis > Hi, > > Im a little bit stuck here. > > Does anyone know how to get date in format '-MM-DD' of a date one > year from now. > So for example today is '2001-03-06' I

[GENERAL] Re: [SQL] Date question

2001-03-06 Thread Michael Fork
This will do it: mfork=# SELECT to_char(now() + '1 Year'::interval, '-MM-DD'); to_char 2002-03-06 (1 row) Michael Fork - CCNA - MCP - A+ Network Support - Toledo Internet Access - Toledo Ohio On Tue, 6 Mar 2001, Boulat Khakimov wrote: > Hi, > > Im a little bit stuck