Format Time

Stimulsoft Reports.NET discussion
Post Reply
siqueira.sistemas
Posts: 1
Joined: Mon Mar 21, 2011 12:33 pm
Location: Brasil

Format Time

Post by siqueira.sistemas »

I wonder how do I convert a value in seconds and convert to ("hh: mm: ss").
example:

DT_TEMPO = 10800 ss

display in the report as follows:

3:00:00

Thanks,

Thiago Siqueira
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Format Time

Post by HighAley »

Hello, Thiago.
[quote="siqueira".sistemas]I wonder how do I convert a value in seconds and convert to ("hh: mm: ss").
example:

DT_TEMPO = 10800 ss

display in the report as follows:

3:00:00[/quote]
For converting value in seconds you must have a variable with digits only.
DT_TEMPO = '10800'

Then in report you can write next string

Code: Select all

{new TimeSpan(0,0,int.Parse(DT_TEMPO))}
You can see it in attached report template.

Thank you.
Attachments
1142.Report.mrt
(4.02 KiB) Downloaded 310 times
Post Reply