Good afternoon
how can i select hours between two times eg(18:00 & 22:00)=4
this code below returns 979848 and i dont understand what this value is
can u please help me
USE [DUT_Governance_Department]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER Proc [dbo].[StudentsRespective_Studlog]
(@User_names char(8)
)
as
select Passwords ,Students.User_names,F_name,Vote_status,Reg_status,Reg_year ,Regions.Region_name,Function_ID.Function_id,DATEDIFF(MONTH, Reg_year,GETDATE())as Month_Diff,Login_try ,DATEDIFF(hour,Try_time, GETDATE())
from Students,Regions,User_Account,Faculty,Campus,Function_ID
where Students.User_names =User_Account .User_names
AND Faculty.faculty_id =Students.faculty_id
AND Campus.Campus_id=Faculty.Campus_id
AND Regions.Region_id=Campus.Region_id
AND Function_ID .Function_id =User_Account.Function_id
AND Students.Vote_status in('N','Y')
AND Function_ID.Function_id =4
AND Students.User_names =@User_names