Re: using between with dates - Mailing list pgsql-general

From Thom Brown
Subject Re: using between with dates
Date
Msg-id v2qbddc86151004290750h992c63c6t99cc031e1ddcb797@mail.gmail.com
Whole thread Raw
In response to using between with dates  (Geoffrey Myers <geof@serioustechnology.com>)
List pgsql-general
On 29 April 2010 14:55, Geoffrey Myers <geof@serioustechnology.com> 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?


You need to cast that last date, so:

ship_date between '04/30/2010' AND '04/30/2010'::date + 14

Thom

pgsql-general by date:

Previous
From: Szymon Guz
Date:
Subject: Re: using between with dates
Next
From: "A. Kretschmer"
Date:
Subject: Re: using between with dates