Expression for Time
Hello everybody, how are u? :)
I've got an expression that looks like that.
=Sum(Fields!Aufwand.Value, "ExpenseData") & " Min."
Now I get e.g. 6000 Min. but I need now 100 h.
but if I get 6001 Min. theres 100,0111111111 h. I need an issue like 100 h 1 min.
RegardsOne who can read, have a clear advantage!
November 2nd, 2010 8:54am
need some help pls.One who can read, have a clear advantage!
Free Windows Admin Tool Kit Click here and download it now
November 3rd, 2010 4:32am
Hi,
In order to display the sum for hours and minutes, we can use the expression like
=Sum(Fields!Aufwand.Value,”ExpenseData”)\60 &
"h" & Sum(Fields!Aufwand.Value,”ExpenseData”)
mod 60 & "min"
As a result, if the sum is 6001, the expression will return 100h1min. However, if the sum is 6000, it will return 100h0min. If you don’t need to display the minute part
if minute is 0, we can modify the expression to
= Sum(Fields!Aufwand.Value,”ExpenseData”)\60 &
"h" & IIf(Sum(Fields!Aufwand.Value,”ExpenseData”)
mod 60>0, Sum(Fields!Aufwand.Value,”ExpenseData”)
mod 60 & "min",
nothing)
If there is also no need to display the hour part if hour is 0, we can modify the expression to
=IIf(Sum(Fields!Aufwand.Value,”ExpenseData”)>0, Sum(Fields!Aufwand.Value,”ExpenseData”)\60 &
"h",nothing)
& IIf(Sum(Fields!Aufwand.Value,”ExpenseData”)
mod 60>0, Sum(Fields!Aufwand.Value,”ExpenseData”)
mod 60 &"min",nothing)
If anything is unclear, please feel free to ask.
Thanks,
Tony ChainPlease remember to mark the replies as answers if they help and unmark them if they provide no help
November 4th, 2010 3:18am
Hello,
Tony's post will give you the required answer, just give a space between the number and " Hr"& " Min".
Hope its clear....
Pavan Kokkula Infosys Technologies Limited.
Free Windows Admin Tool Kit Click here and download it now
November 4th, 2010 4:12am