Re: what's wrong with my date comparison?

From: Michael Glaesemann <grzm(at)seespotcode(dot)net>
To: "Tena Sakai" <tsakai(at)gallo(dot)ucsf(dot)edu>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: what's wrong with my date comparison?
Date: 2007-10-16 18:09:03
Message-ID: 3DA72981-52FC-4044-A24A-D513FF3947DE@seespotcode.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


On Oct 16, 2007, at 12:57 , Tena Sakai wrote:

> select name, value, datecreated
> from mytable
> where datecreated > 2007-10-02;
where datecreated > '2007-10-02'

2007-10-02 = 1995.

# select current_date < 2007-10-31 as arithmetic_comparison,
current_date < '2007-10-31' as date_comparison;
arithmetic_comparison | date_comparison
-----------------------+-----------------
f | t
(1 row)

Michael Glaesemann
grzm seespotcode net

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2007-10-16 20:53:56 Re: what's wrong with my date comparison?
Previous Message Andrew Sullivan 2007-10-16 18:04:55 Re: what's wrong with my date comparison?