[GENERAL] using between with dates

2010-04-29 Thread Geoffrey
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? -- Until later, Geoffrey I predict future happiness for America if they can prevent the government from wasting

Re: [GENERAL] using between with dates

2010-04-29 Thread Geoffrey
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' --

Re: [GENERAL] using between with dates

2010-04-29 Thread Adrian Klaver
On Thursday 29 April 2010 6:58:26 am 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? -- Until later, Geoffrey I predict future happiness

Re: [GENERAL] using between with dates

2010-04-29 Thread Tom Lane
Geoffrey li...@serioustechnology.com writes: ship_date between '04/30/2010' AND '04/30/2010' + 14 ERROR: invalid input syntax for integer: 04/30/2010 Can I use between with dates? The problem with that is the parser has no reason to treat the strings as dates, at least not till it comes to

Re: [GENERAL] using between with dates

2010-04-29 Thread Geoffrey
Tom Lane wrote: Geoffrey li...@serioustechnology.com writes: ship_date between '04/30/2010' AND '04/30/2010' + 14 ERROR: invalid input syntax for integer: 04/30/2010 Can I use between with dates? The problem with that is the parser has no reason to treat the strings as dates, at least not

[GENERAL] using between with dates

2010-04-29 Thread Geoffrey Myers
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? -- Geoffrey Myers Myers Consulting Inc. 770.592.1651 -- Sent via pgsql-general mailing list

Re: [GENERAL] using between with dates

2010-04-29 Thread Szymon Guz
2010/4/29 Geoffrey Myers g...@serioustechnology.com 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? This should be fine: ship_date between

Re: [GENERAL] using between with dates

2010-04-29 Thread Thom Brown
On 29 April 2010 14:55, Geoffrey Myers g...@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,