Date Conversion

Apr 14 2014 11:22 AM
Hi all,
  in my stored procedure i have declared input as DATETIME and passing input as '07/04/2014' through presentation layer.But, in the database the value is stored as '2014-04-07'.when i execute the proc it is giving error as VARCHAR cannot be converted to DATETIME .please help me with this issue.i used SELECT * FROM temp WHERE ValidDate=CONVERT(DATETIME,@ValidDate,121).then also it is throwing me error
Regards,
Sivapratap 

Answers (2)