Ajay Mavatkar

Ajay Mavatkar

  • NA
  • 68
  • 12.4k

NOT IN operator in sp for date field

May 17 2017 1:51 AM
How to use NOT IN operator in sp for a date field.
I need to delete some dates through a delete query inside sp.
 
DELETE FROM table1WHERE 
[Date] NOT IN (@someDates)
 
@someDates is a parameter which holds date like this '05-29-2017' , '07-04-2017' , '09-04-2017'
 
It is giving error as follows
Conversion failed when converting date and/or time from character string
 
Please suggest 
 

Answers (3)