I have a table abc having column and data as :
here Dhours,Dmins,MHours and MMins are int values.
now my problem is this I have to subtract MHours from Dhours and MMins from Dmins
but I am getting in negative but i have to get data as per hours and minutes
means if Dmins is less than MMins like in this case answer should be 45 instead of -15 and hours should be subtracted means 5 .
i used Sql query as
select Employee,Dhours,Dmins,MHours,MMins,(Dhours-MHours)as netHours,(Dmins-MMins) as netMins from abc
Please help me
Codeblock added - OriginalGriff[/edit]