Subject Re: [ib-support] Select with dates
Author Helen Borrie
At 10:45 AM 27/12/2002 -0300, you wrote:
>Hi!
>
>I'm trying to do the folow select:
>select * from table where data between '12/01/2002' and '12/23/2002'
>
>And in the table I have:
>code------data--------------text
>1 23/12/2002 xxxxxxxx
>2 24/12/2002 yyyyyyyyy
>
>So, when I execute the select, its returns null, could someone help, I'm
>using FB and the database was created with dialect 1.

Dialect 1 dates are timestamps. This query won't return the first row if
its time portion is greater than '00:00:00'. Change the WHERE clause to one
of the following:

where data between '12/01/2002' and '12/23/2002 23:59:59.9999'

or

where data >= '12/01/2002' and data < '12/24/2002'

heLen