Date parameter

  • khalil

    SSC Enthusiast

    Points: 117

    Hii everyone I am trying to build a report but the date format in the datasource is dd/mm/YY ,the parameter is the Date ,if i fix the date on the dataset it shows an empty report need help please§

  • drew.allen

    SSC Guru

    Points: 76595

    Date fields do not have formats.  Formats are applied by the presentation layer.

    If you are storing "dates" in character fields, STOP IT!!!!! You should use the correct data type for the data.  Dates should be stored in DATE/TIME fields not strings except for storing them TEMPORARILY in string fields when loading data so that you can check for invalid dates.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • Jeffrey Williams 3188

    SSC Guru

    Points: 88122

    If your report parameter is not defined as a date - it should be...if you are calling a stored procedure and the input parameter is not defined as a date/datetime/datetime2 data type - it should be.

    If you are using CAST or CONVERT to modify the format of a column to a specific format - stop doing that.  Formatting a report column is much better done in the text field - especially since you can use a format that translates to the end users regional settings (if needed).

    [font="Verdana"]Jeffrey Williams
    Problems are opportunities brilliantly disguised as insurmountable obstacles.

    How to post questions to get better answers faster[/url]
    Managing Transaction Logs[/url]
    [/font]

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

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