User-1634604574 posted
i have these two times i want they are equal how can make them equal to each other
set @total_working_hour=(SELECT CONVERT(varchar, DATEADD(minute, DATEDIFF(minute, CAST('7:30' as time),CAST('11:30' as time)), 0), 108) )
if @total_working_hour=( SELECT CAST(CONVERT(VARCHAR,DATEADD(SECOND, @Working_Hours_Threshold_for_Half_Day * 3600, 0),108) AS TIME) )
begin
update Attendance set Status='Half Day' where attendance_date=@current_date and Attendance.Employee_ID=@Employee
end
result of @total_working_hour=04:00:00
result of SELECT CAST(CONVERT(VARCHAR,DATEADD(SECOND, @Working_Hours_Threshold_for_Half_Day * 3600, 0),108) AS TIME) =04:00:00.0000000
how can i make them equal