Re: [GENERAL] select using date

1999-01-08 Thread Kevin Heflin
On Fri, 8 Jan 1999, Jose' Soares wrote: > Try: > > select current_date, CURRENT_DATE - INTERVAL '1 DAY'; > ?column?|?column? > --+-- > 1999-01-08|1999-01-07 00:00:00+01 > (1 row) > > PostgreSQL has a syntax sligth different than SQL92. You have to enclose > '1 DAY

Re: [GENERAL] select using date

1999-01-08 Thread Jose' Soares
Try: select current_date, CURRENT_DATE - INTERVAL '1 DAY'; ?column?|?column? --+-- 1999-01-08|1999-01-07 00:00:00+01 (1 row) PostgreSQL has a syntax sligth different than SQL92. You have to enclose '1 DAY' instead of '1' DAY. -Jose'- Kevin Heflin wrote: > > Tryi

Re: [GENERAL] select using date

1999-01-05 Thread Tim Williams
> 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

[GENERAL] select using date

1999-01-05 Thread Kevin Heflin
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 B