Hey guys,

I'm want to retrieve results from the database, where datetime picker given value, is equal to database value.

           var _check = (from day in Check.tbl_employees
                         where day.d_from== _frm && day.d_to == _to
                       select new
                       {
                           day.desg_id,
                       }).FirstOrDefault();

datetime picker gives a value with its time,but i'm only interested in date.so i need help to compare in date which gives from the datetime picker(_from and _to) in database value(day.d_from,day.d_to).
And when comparing dates,does it compare time too?
need help ASAP.
thanks in advance.

drax

Edited 3 Years Ago by Dani: Formatting fixed

Hey guys,

I'm want to retrieve results from the database, where datetime picker given value, is equal to database value.

           var _check = (from day in Check.tbl_employees
                         where day.d_from== _frm && day.d_to == _to
                       select new
                       {
                           day.desg_id,
                       }).FirstOrDefault();

datetime picker gives a value with its time,but i'm only interested in date.so i need help to compare in date which gives from the datetime picker(_from and _to) in database value(day.d_from,day.d_to).
And when comparing dates,does it compare time too?
need help ASAP.
thanks in advance.

drax

i found the way,
its simple.

date has to be datetimepicker.value.day

Edited 3 Years Ago by mike_2000_17: Fixed formatting

This question has already been answered. Start a new discussion instead.