Hi
I want to check whether a person has applied for leave today for that i am passing datetime.now as parameter but i am getting null as result but there records already exists in the table how to check it
DateTime minDate = DateTime.MaxValue;
DateTime maxDate = DateTime.MinValue;
foreach
(
string
dateString
in
StringDates)
{
DateTime date = DateTime.Parse(dateString);
if
(date < minDate)
minDate = date;
(date > maxDate)
maxDate = date;
}
string q= "Select Count(*) from table1 where ename='" + TextBox1.Text + "' AND leaveDate='" + DateTime.Now.ToShortDateString() +"'" ;