forum
forum

Reputation: 43

Sum Of Time In RDLC Report

I want to sum this WorkedHours in RDLC Report..WorkedHours type is Varchar..

WorkedHours
  04:00:25
  07:23:01
  11:02:15

like Total: 22:25:41

How Can I Achieve It ?

Upvotes: 0

Views: 2188

Answers (2)

Caio Vitullo
Caio Vitullo

Reputation: 91

You can use the TimeStamp class gether with the Sum function, follow an example:

=TimeSpan.FromMinutes(Sum(Fields!Dirigindo.Value))

Upvotes: 3

Jason Horner
Jason Horner

Reputation: 3690

You need to either calculate it in the Dataset. Perhaps casting it to a proper date time format (you can give it a dummy date component such as 1900-01-01 and then perform the calculation use Datediff):

or use an SSRS expression using the TimeSpan object:

http://msdn.microsoft.com/en-us/library/system.timespan.aspx

Upvotes: 0

Related Questions