Re: using between with dates

From: Geoffrey <lists(at)serioustechnology(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: using between with dates
Date: 2010-04-29 14:09:31
Message-ID: 4BD9931B.4020507@serioustechnology.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Geoffrey wrote:
> I'm trying the following:
>
> ship_date between '04/30/2010' AND '04/30/2010' + 14
>
> But this returns:
>
> ERROR: invalid input syntax for integer: "04/30/2010"
>
> Can I use between with dates?

Got it:

ship_date between '04/30/2010' and timestamp '04/30/2010' + interval '14
day'

--
Until later, Geoffrey

"I predict future happiness for America if they can prevent
the government from wasting the labors of the people under
the pretense of taking care of them."
- Thomas Jefferson

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2010-04-29 14:11:00 Re: using between with dates
Previous Message Tom Lane 2010-04-29 14:01:31 Re: Tsearch not searching 'Y'