When comparing date values without time the best way to compare is
select convert(varchar(8), DATEFIELD, 112) - This willl produce the output
Better use this format for making comparisons.
"Ramesh" <jr_babuhotmail.com> wrote in message
> In my database my date field having date and time info.
> But for selecting records i am passing only date value (No
> time). I am using following comparision
> cast(convert(varchar,DateField,101) as datetime) >= cast
> (Convert(varchar,''' + FromDate + ''' ,101) as datetime)
> Any other best way is there? I am using cast and convert
> function in both place. I want to write it in a better way.
> Please let me know.