I have a decimal value (64.17 hours) and need to convert this to a timestamp of hours, minutes and seconds but the hours value should show 64 not 16.
It should also not show the microseconds so 64.17 would be displayed as
64:10:12
Anyone help me on this? I also need to put it in an aggregate function (average in this case)
TimeSpan ts = new TimeSpan();
ts.Add(TimeSpan.FromHours(ncr_time_lost));
Console.WriteLine(ncr_time_lost + " = " + TimeSpan.FromHours(ncr_time_lost).ToString());
return TimeSpan.FromHours(ncr_time_lost);
Update Working Code
Add the below to the code part for the report
Here is the answer with an example: TimeSpan.FromHours Method.
Update:
The format “64:10:12” can be done with the following code:
Update:
Don’t know whether it’s correct, but try the following to use it from RDLC:
Then try to get it from the report as
"=Fields!FormattedDate.Value".