|
Afternoon
I have a command object and am trying to pass a parameter to it. I keep getting the message " conversion failed when converting data and/or time from character string. " The field in the PT_NC is also a datetime field.
The parameters are set up as DateTime. The code that's breaking it is:
isnull ((select sum(nc.qty_rejected) from K6Unipoint_Production.dbo.PT_NC nc where nc.Origin = 'Vendor' and nc.Origin_ref = v.vendor and nc.NCR_Date between convert(datetime,'{?DateFrom}') and convert(datetime, '{?DateTo}')),0)
Can any one give me any direction?
Thanks,
Laura
|