It seems like you have some kind of data format missmatch. If you declare your column of type
nvarchar(255)
, which is somehow equivalent to the
string
type, the value used in the SELECT's WHERE clause must also be of that type. It could probably be better redefining the column type as
DateTime
to be able to use this construct:
cmd.Parameters.AddWithValue("@intvwdate", Convert.ToDateTime(monthCalendar1.SelectionStart));