SSRS report not displaying Time values Correctly from SQL Server table

  • 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

  • Here's a solution... tried it and it looks like it works:

    https://skamie.wordpress.com/2012/05/21/ssrs-format-option-for-milliseconds/

  • 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

  • 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


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply