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
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Formating time

Author  Topic 

Skydolphin
Starting Member

43 Posts

Posted - 2009-11-04 : 19:35:31
I have a report that executes a stored procedure. The data for a time field is actually an integer and the Stored procedure converts it to seconds from midnight. (154300 becomes 2571:40). I don't know how to format it properly in SSRS. I have tried =FormatDateTime(Fields!MyTime.Value,3) but that does not work. Anyone have any idea how to get the time format to be hh:mm:ss in my report?

Thanks

Rhonda

JCirocco
Constraint Violating Yak Guru

392 Posts

Posted - 2009-11-05 : 07:14:16
What should the 2571:40 return if done correctly?

John
It's a small world (but I wouldn't want to paint it)
Go to Top of Page

rohitkumar
Constraint Violating Yak Guru

472 Posts

Posted - 2009-11-05 : 13:43:47
is this what it should return?

select dateadd(second, 154300, dateadd(dd, 0, datediff(dd, 0, getdate())))
Go to Top of Page
   

- Advertisement -