From: | Kevin Heflin <kheflin(at)shreve(dot)net> |
---|---|
To: | "PGSQL-General (E-mail)" <pgsql-general(at)postgreSQL(dot)org> |
Subject: | select using date |
Date: | 1999-01-05 16:55:53 |
Message-ID: | Pine.LNX.4.02.9901051047510.3085-100000@mercury.shreve.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Trying to use select statement using CURRENT_DATE
Which works fine like so:
select * from headlines where dateof = CURRENT_DATE order by dateof desc
But I'm also wanting to do something similar to:
select * from headlines where dateof = CURRENT_DATE - INTERVAL '1' DAY
order by dateof desc
Basically just trying to subtract 1 day from the CURRENT_DATE
When I try the above I get
ERROR: parser: parse error at or near "day"
Any suggestions would be appreciated.
Kevin
--------------------------------------------------------------------
Kevin Heflin | ShreveNet, Inc. | Ph:318.222.2638 x103
VP/Mac Tech | 333 Texas St #619 | FAX:318.221.6612
kheflin(at)shreve(dot)net | Shreveport, LA 71101 | http://www.shreve.net
--------------------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | JB Wang | 1999-01-05 18:08:27 | subscribe |
Previous Message | Tim Williams | 1999-01-05 11:06:18 | Re: [GENERAL] select using date |
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas G. Lockhart | 1999-01-05 17:16:03 | Re: Date/time fixes for HAVE_TM_ZONE platforms |
Previous Message | Michael Contzen | 1999-01-05 16:14:57 | PL/PGSQL bug using aggregates |