How can I format timespan in field express to show just HH:mm
Posted on 2009-05-06
I have a report that I have to derive the DutyHours from two datetime fields (startdate & end date). datediff(minute, min(s.arriveDateTime), max(s.departDateTime)) 'hours', I needed the total time to show in hour and minutes as 10.05 instead of 10.09 (decimal). I fixed this with convert(varchar(2), x.hours / 60) + ':' + convert(varchar(2), x.hours % 60).
Now my problem is...how do I get my total hours. I can't SUM a string. I tried to use the timespan.parse in my field expression and that works great except that I don't need the seconds to show. Does someone know how to format the timespan option to show just HH:ss?