I am trying to create a report using a SQL Server stored procedure that expects two datetime input parameters. However the stored procedure does not accept the input parameter value selected on prompt screen, generating an error
'Incorrect syntax near keyword CONVERT'.
SQL generated by report is using Convert function by default
EXECUTE [Projects_findings_summary_date]
CONVERT (DATETIME, '12/01/2017 00:00:00', 120),
CONVERT (DATETIME, '12/31/2017 12:59:59', 120)
GO
This code generated the error in SQL Server Management Studio as well. But it works fine if we take the CONVERT function out.
EXECUTE [Projects_findings_summary_date]
'12/01/2017 00:00:00',
'12/31/2017 12:59:59'
GO
Any help resolving this issue is appreciated.
We have recently upgraded to Crystal Reports 2016 and SQL Server 2014.