Andrii Sokalskyi
Andrii Sokalskyi

Reputation: 1

SSRS export timespans more 24 hours to excel

friends. I have field in my report that contains time string 25:00:00. How can i export this field to excel and get column format [h]:mm:ss automatically?

Steps that i tried:

  1. Used function System.TimeSpan.FromSeconds(90000). But it gave me result 1.01:00:00 and it exports to excel as General format.

  2. Used expression for TextBox properties -> Number in SSRS like this: =IIF(Globals!RenderFormat.Name="EXCELOPENXML","[h]:mm:ss","HH:mm"). It gave the same result as previous.

If there are some ideas how to decide this problem, I wait your suggestions. Thanks.

Upvotes: 0

Views: 318

Answers (1)

Naveen Kumar
Naveen Kumar

Reputation: 1541

FORMAT function removes the actual data type of the column while exporting. So Instead i will suggest use FORMAT property (as in below screenshot)

enter image description here

Now if you try again & export report to excel it will export using the format property of that cell.

Upvotes: 0

Related Questions