Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have values in second and I want to display it like total no of hrs : total not of minutes : total no of seconds. In RDLC.

Please note that days values should be added to total hrs.
Posted

1 solution

C#
Int64 seconds = 10000;
TimeSpan span = new TimeSpan(TimeSpan.TicksPerSecond * seconds);
string str = span.Hours.ToString("00") + ":" + span.Minutes.ToString("00") + ":" +             span.Seconds.ToString("00");
lblmsg.Text = str;
 
Share this answer
 
Comments
Showlar 15-Mar-13 4:02am    
Which kind of Java Development Environment do you use in your programming works ? I search through my Netbeans but I couldn't see the Timespan, Int64 stuff in it.
Matt T Heffron 15-Mar-13 17:28pm    
This is c#. And not even done well.
nareshE 29-May-13 10:42am    
Having Same problem in RDLC ...please tell me how to do in rdlc

NARESH

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900