How to convert decimal numbers to Hours and minutes

  • Hi,

    I am using SSRS 2005. I want to convert decimal numbers to Hours and minutes.

    Say suppose, I am adding daily work hours and minutes and the total is 208.63.

    Here 208 hrs and 63 minutes. How to convert this to 209 hrs 03 minutes in SSRS.

    Any In-built function is there? or how to do using custom code?

    Appreciate your help.

    Regards,

    Bala

  • How is this stored in your DB? Are hours and minutes separate columns as there may be an issue with summing up values in this way?

  • the above question aside, based on what you asked for the following appears to work

    =format(int(ReportItems!MyDecimalTotal.Value) + int(round(reportitems!MyDecimalTotal.value mod int(reportitems!MyDecimalTotal.value),2)*100)/60,"000") + " hours " + format(round((ReportItems!MyDecimalTotal.Value - int(ReportItems!MyDecimalTotal.Value))*100,0) mod 60,"00") + " minutes"

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

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