Query runs fine in SSMS but throws error in SSRS while creating dataset

  • Hi..My query runs find in SSMS but while creating in SSRS it throws errors:

    "Failed to convert parameter value from a String to a DateTime. (mscorlib)"

    Executing something like this in SSMS:

    EXEC [dbo].[Quality_Right_Party_Contact_Report] '9/12/2012',10100,99000,NULL

    Can anyone please tell me what is the error??

    Thanks,

    Komal

  • Probably due to you not using an ISO standard for your dates.

    Depending on the connection SQL will interpret dates differently, take '09/13/2012' is now in MDY format that works, but in DMY format it doesnt due to there being no month 13, so that date will fail to convert.

    Try to use ISO formatting YYYY-MM-DD HH:MM:SS.MS or use the datetime parameter type in SSRS to enable the date pickers instead of typing in the date manually.

  • Thanks for the help.It worked.

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

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