Re: what's wrong with my date comparison? - Mailing list pgsql-sql

From Andrew Sullivan
Subject Re: what's wrong with my date comparison?
Date
Msg-id 20071016180455.GQ3255@crankycanuck.ca
Whole thread Raw
In response to what's wrong with my date comparison?  ("Tena Sakai" <tsakai@gallo.ucsf.edu>)
List pgsql-sql
On Tue, Oct 16, 2007 at 10:57:03AM -0700, Tena Sakai wrote:
>  select name, value, datecreated
>    from mytable
>   where datecreated > 2007-10-02;                       ^^^^^^^^^^

2007-10-02 is an arithmetic expression equivalent to 1995.

I think what you want is
WHERE datecreated > '2007-10-02';

Note the quotes.

A

-- 
Andrew Sullivan  | ajs@crankycanuck.ca
In the future this spectacle of the middle classes shocking the avant-
garde will probably become the textbook definition of Postmodernism.                --Brad Holland


pgsql-sql by date:

Previous
From: "Tena Sakai"
Date:
Subject: Re: what's wrong with my date comparison?
Next
From: Michael Glaesemann
Date:
Subject: Re: what's wrong with my date comparison?