Hi,
I have a table named Attendance_Master and structure is as
AttendanceId int,
LoginTime datetime,
LogoutTime datetime,
DHours int,
DMinutes int,
MHours int,
MMinutes int
and values in the table is as
AttendanceId 1,
LoginTime '2010-12-21 15:45:17.500',
LogoutTime '2010-12-21 15:56:28.660',
DHours 0,
DMinutes 11,
MHours 0,
MMinutes 27
now my problem is that I want to subtract MHours from DHours and
MMinutes from MHours
but its
select LoginTime,LogoutTime,DHours,DMinutes,MHours,MMinutes,(Dhours-Mhours) as NetHours,(DMinutes-MMinutes)as NetMinutes from Attendance_Master
where convert(varchar,LoginTime,103)=convert(varchar,getdate(),103)
but minutes are coming as -26.
I want to change it into minutes