2

I am passing {4/1/2017 12:00:00 AM} from my C# code to SQL Server as a parameter of a stored procedure. And in the stored procedure, I want to convert this into MMddyyyy format for data processing. I tried many suggestions from Google but nothing works for me.

Throwing this error:

The conversion of a varchar data type to a datetime data type resulted in an out-of-range value

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Tech Learner
  • 1,227
  • 6
  • 24
  • 59

1 Answers1

0

Try Convert keyword in SQL but should pass some param value (101,107) for convert.

Tech Learner
  • 1,227
  • 6
  • 24
  • 59