hud. hud. - 4 years ago 140 Question

Like statement for datetime in SQL ASP.NET MVC

I try to do a filter for SQL search. I have a database with columns id,remarks and date. Date column datatype is datetime. What i want to do is using LIKE statement to filter the search. Its like

where date like '%2016%'
. I want data from the year 2016 only. I try to use contains. but no success

Dim Query = From apt In dbb.apt
Select, apt.remarks,

Answer Source

Use below to get year value from your date filed.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download