Frage

I have a report where I want to display time in hours and minutes (17hrs 30 mins)

The dataset returns this value in decimals (Eg 17.5)

How would I convert this decimal to the format specified above (17hrs 30 mins). Is there some kind of built in function that can do this easily?

War es hilfreich?

Lösung

This works for your particular example:

=Floor(Fields!MyValue.Value)
    & " hrs "
    & CInt((Fields!MyValue.Value - Floor(Fields!MyValue.Value)) * 60) & " mins"

You may need to tweak for all possible scenarios but this should be a good starting point.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top