Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 Need to format to hh:mm:ss

Author  Topic 

latingntlman
Yak Posting Veteran

96 Posts

Posted - 2008-05-22 : 15:52:18
I'm creating a report in SSRS 2000 and one field reflects time spend on phone daily. However is being displayed as for example, OutboundHours 4818. How can I get this to display in the report as hh:mm:ss.

Is there code that I can plug into a variable or syntax that will accomplish this?

I don't want to convert from the sql code because in the report I'll need to create groupings with totals.


Any light will be appreciated.

John

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-05-23 : 05:00:22
Is the source field a datetime field?
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-05-23 : 05:07:16
What does "OutboundHours 4818" represent?
4h 8m 18s ?

Or does "OutboundHours 4818" represent 4818 seconds, which is 1h 20m 18s?



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

latingntlman
Yak Posting Veteran

96 Posts

Posted - 2008-05-26 : 12:51:19
I believe it represents time in Seconds.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-05-26 : 13:03:04
SELECT CONVERT(CHAR(8), DATEADD(SECONDS, OutboundHours, '00:00:00'), 108)



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
   

- Advertisement -