SELECT * FROM diary WHERE date between DATE(2009,11,5) AND;
DATE(2010,1, 13)
returns all records where date greater/equal nov, 5 2009 and smaller/equal jan 13, 2010
I don't use {} any more since Y2K :-)
Peter
>Can anyone give me a clue why using the between function in a query will not retrieve the beginning value and ending value. I have tried "field between lowvalue and highvalue"; between(field,lowvalue,highvalue); and field greaterthanorequalto lowvalue and field lessthanorequalto highvalue. None of these get 2nd value. No matter what the difference is between values, only the lowvalue to the value before the highvalue displays. In the code, the where statement and dates are built dynamically.
>
>Select room_desc,description,begin_time,end_time ;
> ,user_id,user_ph,add_date,delete_id,delete_date ;
>FROM reservation ;
>Where empty(allt(delete_id)) and room_id=3 and ;
> BETWEEN(begin_time,{^2010-2-10},{^2010-2-12}) ;
>order by room_id,begin_time
>
>Chuck
Peter Cortiel