February 26, 2015 at 5:38 pm
I am having problems displaying time values in my SSRS report. below is info. Tried expressions still does not work. I would appreciate anyone's help. I want the values to show what in the SQL Server table 00:00:00.82. I tried stored proc still does not work.
SQL Server table time value shown in milliseconds:
00:00:00.82
Reporting Services report value shown:
00:00:00
February 26, 2015 at 7:44 pm
Here's a solution... tried it and it looks like it works:
https://skamie.wordpress.com/2012/05/21/ssrs-format-option-for-milliseconds/
March 2, 2015 at 9:57 am
Thanks for responding back. I don't want month, day or year. It is a time field. I only wnat the time with milliseconds. I get the following error on field. I don't know why you cannot format field. I appreciate your help.
Field Datatype: [CPUTM] [time] (2)NULL
Data in table : 00:00:00.82
Below is error:
Warning 1 [rsRuntimeErrorInExpression] The Value expression for the textrun ‘CPUTM.Paragraphs[0].TextRuns[0]’ contains an error: Unable to cast object of type 'System.TimeSpan' to type 'System.IConvertible'. C:\Users\bmanning\documents\visual studio 2010\projects\SMF_Reports\SMF_Reports\SMF_Detail__Proc_Report.rdl 0 0
March 2, 2015 at 2:44 pm
can you convert it to varchar(11) in your report datasource?
this produces the expected format, and cuts off the trailing zeros from a simple CONVERT(varchar,@CPUTM)
/*--Results
(No column name)(No column name)
00:00:00.8200:00:00.8200000
*/
DECLARE @CPUTM [time] ='00:00:00.82'
SELECT CONVERT(varchar(11),@CPUTM),CONVERT(varchar,@CPUTM)
Lowell
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply