Hussain Ahmed

Hussain Ahmed

  • 693
  • 1.3k
  • 1.7m

show sql query result in label

Sep 16 2014 3:58 AM
string komut = "select SUM(DATEPART(hh, CAST([TimeIn] AS DATETIME))) + ( SUM(DATEPART(MINUTE, CAST([TimeIn] AS DATETIME))) / 60 ) + ( SUM(DATEPART(MINUTE, CAST([TimeIn] AS DATETIME))) % 60 + ( SUM(DATEPART(SECOND, CAST([TimeIn] AS DATETIME))) / 60 ) ) / 60 from hr.Attendance_new A INNER JOIN hr.Employee B ON A.EmployeeNo=B.EmpID where A.EmployeeNo='" + (user.EmployeeID.ToString()) + "' AND Year(A.DateIn) like '%'+'" + DateTime.Now.Year.ToString()+ "'+'%' group by A.EmployeeNo";
 
 
how to show this query result in label .this query calculate total hour and work fine but i want to show this query result in label .plz help me

Answers (4)