Page 1 of 1
How to make the integer in Hours,min and sec format
Posted: Thu May 17, 2012 10:52 am
by harnekdeveloper26
Hello friends,
I am having two integer values like 3600 and 4500 i want to add this two integer and show the sum in Hours ,Min and sec , for e.g 1Hour,2Mins,3secs.Please any one can help me with this its urgent , i am working stimulsoft silverlight report.
Thanks,
Harnek
How to make the integer in Hours,min and sec format
Posted: Fri May 18, 2012 4:28 am
by HighAley
Hello.
harnekdeveloper26 wrote:I am having two integer values like 3600 and 4500 i want to add this two integer and show the sum in Hours ,Min and sec , for e.g 1Hour,2Mins,3secs.Please any one can help me with this its urgent , i am working stimulsoft silverlight report.
What do 3600 and 4500 values mean? Minutes? Seconds?
Thank you.
How to make the integer in Hours,min and sec format
Posted: Fri May 18, 2012 7:41 am
by harnekdeveloper26
Hello Aleksey Andreyanov,
Thanks for reply, actually 3600 is an integer value to whom i have to convert in Hours,Seconds and Mins Format,i need expression for this
How to make the integer in Hours,min and sec format
Posted: Mon May 21, 2012 2:13 am
by HighAley
Hello.
harnekdeveloper26 wrote:Thanks for reply, actually 3600 is an integer value to whom i have to convert in Hours,Seconds and Mins Format,i need expression for this
Do you use Native Silverlight or Client/Server?
Please send us exact example of what you have and what are you trying to get.
Thank you.
How to make the integer in Hours,min and sec format
Posted: Mon May 21, 2012 3:23 am
by harnekdeveloper26
Hello Aleksey,
I am using Native Silverlight, ok i give u one example , i have one record in decimals like this 0.77777722 i multiply this by 3600 to convert it to seconds, now the seconds which i get after multiplying is in integer format but i want to show this integer in Hours,Min and Sec format(Like 1Hour,2Mins,3Secs) and i want to do this from Report by making Formula field, so what will be the expression for this.
Thanks,
Harnek.
How to make the integer in Hours,min and sec format
Posted: Mon May 21, 2012 4:26 am
by HighAley
Hello, Harnek.
harnekdeveloper26 wrote:I am using Native Silverlight, ok i give u one example , i have one record in decimals like this 0.77777722 i multiply this by 3600 to convert it to seconds, now the seconds which i get after multiplying is in integer format but i want to show this integer in Hours,Min and Sec format(Like 1Hour,2Mins,3Secs) and i want to do this from Report by making Formula field, so what will be the expression for this.
You should use next expression:
Code: Select all
{Truncate(tt).ToString() + " hour " +
Truncate((tt - Truncate(tt)) * 60).ToString() + " min " +
Truncate((tt * 60 - Truncate((tt - Truncate(tt)) * 60)) * 60).ToString() + " sec"}
Where tt is your decimal value. For example, 0.77777722.
Thank you.