From: Nick Peters <nick.peters@candoltd.com>
To: pgsql-sql@postgresql.org
Subject: Comparing Dates
Date: Thu, 18 Nov 2004 15:01:58 -0600
Message-ID: <419D0DC6.5080504@candoltd.com> (raw)
Hey,
I am trying to compare dates in a sql statement. this is what i have tried:
SELECT * FROM transactions WHERE shippingdate>2004-06-08 AND
transtype='Sale';
but it returns all rows. When i switch the > with a < it returns
nothing. I have even tried with todays date and have got the same
results. So i guess my question is how do i compare two dates? BTW the
column by the name of shippingdate is a date data type with the same
format as the dates show above.
Thanks in advance.
-Nick
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: nick.peters@candoltd.com
Subject: Re: Comparing Dates
In-Reply-To: <419D0DC6.5080504@candoltd.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox