James Murrell
asked on
adding to fields together
I have this part of code with provides hrs and minutes for two columns
but i now need to add another colunm which is the total of the two fields
so today i have
hrmins bHrMin
6:45 0:30
0:45 0:00
6:00 0:30
5:00 0:30
i would like
hrmins bHrMin TotalMins
6:45 0:30 6:15
0:45 0:00 0.45
6:00 0:30 5.30
5:00 0:30 4.30
but i now need to add another colunm which is the total of the two fields
so today i have
hrmins bHrMin
6:45 0:30
0:45 0:00
6:00 0:30
5:00 0:30
i would like
hrmins bHrMin TotalMins
6:45 0:30 6:15
0:45 0:00 0.45
6:00 0:30 5.30
5:00 0:30 4.30
FLOOR((charge_split_1.duration + 1) / 60.0)) + ':' + RIGHT('0' + CONVERT(varchar, (charge_split_1.duration + 1) % 60), 2) AS hrmins, CONVERT(varchar,
FLOOR(charge_split_1.break_time / 60.0)) + ':' + RIGHT('0' + CONVERT(varchar, charge_split_1.break_time % 60), 2) AS bHrMin,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER