J
jed
string selectstr = "SELECT SUM(hrs) AS total_hours,SUM(mins)AS
total_mins FROM Timerecords WHERE (workdate >='" +
Convert.ToDateTime(dateTimePickerfirst.Text) + "')AND (workdate<='" +
Convert.ToDateTime (dateTimePickersecond.Text) + "')";
I have two datepickerboxs that i want to select dates in.I want the
selectstr string to recieve the values of the the calculated hours and
the calculated minutes but it must only sum up the values between the
two dates that i select in the datepickerboxs.
I dont receive the correct values from total_hours and total_mins.It
doesnt add the the values between the the two dates.I cant work out
where the error is.What is the best way to insert datetime into an SQL
statement.
total_mins FROM Timerecords WHERE (workdate >='" +
Convert.ToDateTime(dateTimePickerfirst.Text) + "')AND (workdate<='" +
Convert.ToDateTime (dateTimePickersecond.Text) + "')";
I have two datepickerboxs that i want to select dates in.I want the
selectstr string to recieve the values of the the calculated hours and
the calculated minutes but it must only sum up the values between the
two dates that i select in the datepickerboxs.
I dont receive the correct values from total_hours and total_mins.It
doesnt add the the values between the the two dates.I cant work out
where the error is.What is the best way to insert datetime into an SQL
statement.