>>>Don't worry. Using BETWEEN, SQL server doesn't have a problem with datetime values and it doesn't have a problem with the time portion either. It is VFP that does have a problem with time portion.
>>>Cetin
>>
>>Why do you say that? Please read carefully Aaron Bertrand's blog I gave in my other message.
>
>Because it is like that. I wouldn't read, it is a long writing. Would you instead tell me where does it say SQL server has problem using between with datetime values or it has a problem with the time portion.
>Cetin
If you have a datetime field in SQL Server and you want to ensure that time portion of the particular date is included in the result set, then the only way to select the information would be
select * from myTable where DateField >=@StartDay and DateField < @EndDay + 1
Otherwise there is a risk of losing some values due to time precision.
Aaron Bertrand's blog (short one) explains it very clearly - take a read, you would not regret.
If it's not broken, fix it until it is.
My Blog