This is a migrated thread and some comments may be shown as answers.

Failed to convert parameter value from a string to a DateTime.

1 Answer 1177 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Lekshmi
Top achievements
Rank 1
Lekshmi asked on 14 Aug 2013, 08:55 AM
I tried to add a Report in my MVC project and tried to add SQL datasource to the report.
At Configure DataSource Command I have selected Stored Procedure and my selected stored procedure contains two parameters of type datetime.
On ExecuteQuery when I give value "07/01/2013" for parameters of type datetime error occurs saying "Failed to convert parameter value from a string to a DateTime."
Tried giving the above value in following formats but still error persist.
"07/01/2013"
'07/01/2013'
20130701
Please help me out from this and I am new to telerik reporting.

Any help would be appreciated. Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Ivan Hristov
Telerik team
answered on 16 Aug 2013, 03:40 PM
Hi Lekshmi,

You need to check your database date format. The easiest way to do it is to execute this query on your MSSQL server:
select GetDate();
and see the format of the returned result. If it is something like "2013-08-16 13:50:59.100", you would have to pass your value accordingly - in your case it would look like this: 2013-07-01.

Regards,
Ivan Hristov
Telerik

Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.

Tags
General Discussions
Asked by
Lekshmi
Top achievements
Rank 1
Answers by
Ivan Hristov
Telerik team
Share this question
or