Link to home
Start Free TrialLog in
Avatar of James Murrell
James MurrellFlag for United Kingdom of Great Britain and Northern Ireland

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
 
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,

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of James Murrell
James Murrell
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of James Murrell

ASKER

solution provided