select * from online_payments where PaymentDate like '%2012%'
SELECT * FROM Student WHERE dat2 >= '2012-02-12' and dat2 < '2012-02-13'
CONVERT
select * from online_payments where CONVERT(varchar(8), PaymentDate,112) = '20120401'
select * from online_payments where DateAdd(day, DateDiff(day, 0, PaymentDate), 0) = '2012-04-01'
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)