Groups | Blog | Home
all groups > sql server reporting services > january 2005 >

sql server reporting services : Help with Time Display


pittpanther
1/3/2005 5:35:02 PM
I am having a difficult time with the following problem. I have a calculated
field that calculates the difference between two dates, resulting in the
number of seconds between the two dates. I would like to display this value
as:

xx hrs yy mins zz secs

I have written an expression using some division and mod functions, but am
struggling getting the rounding correct. Can anyone offer some suggestions
to simplify this for me?

Japater
2/14/2005 11:03:06 PM
You can use the following expression:

(TimeInSecs\3600) & " hrs " & ((TimeInSecs mod 3600)\60) & " mins " &
(TimeInSecs mod 60) & " secs"



[quoted text, click to view]
AddThis Social Bookmark Button