Numeric To Time Conversion "00.000" to hh:mm

  • Hi All.

    I have a table which stores time for all employees for each work day by day

    Ex.

    Date Emp Operation Work

    24/03/2006 DAS Washing 1.50 (interprets 1 hours and 30 mins)

    25/03/2006 DAS Finishing 4.75 (interprets 4 hours and 45 mins).

    Now I want total of Work of the above Emp

    Total (6.25) AS Numeric.

    Total (6 Hours and 15 mins).

    How to got this by SQL Query

  • select WorkTime = convert(varchar(5),dateadd(ss,sum(Work)*3600,0),114)

    from

    ( --Test Data

    select Work = 4.75 union all

    select Work = 1.50

    ) a

    Results:

    [font="Courier New"]WorkTime

    --------

    06:15[/font]

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply