none
Formatting an int as (x)d, (y)h, (z)m in RDLC RRS feed

  • Question

  • I'm returning a int from my database which denotes time in minutes.

    i.e. if the column's value is 10, it means 10 minutes. If it's 199, it means its 3 hours and 19 minutes.

    I then group my results, and calculate a SUM(Fields!TotalTime.Value).

    How can I format this int in the following format : (x)d, (y)h, (z)m, where

    d = days
    h
    = hours
    m
    = minutes

    using the built-in functions? Or, can I somehow write my own function, like a WPF Converter? Because I'm grouping in the report, I cannot return an already formatted value from the database.

    Wednesday, February 8, 2012 2:46 PM

Answers