I am passing a datetime value from C # to SQL Server SP. If I pass the format dd-MM-yyyy, then it works fine, but does not return any values from the SP, even if there are records of this date. If I run SP with the format MM-dd-yyyy, then it returns the error "Error converting data type nvarchar to datetime". SP
execute usp_detData '22/12/2012 00:00:00', '31/12/2013 23:59:59' --- error
execute usp_detData '12/22/2012 00:00:00', '12/31/2013 23:59:59' --- works great
Could you give me a solution
source
share