-----------------------
Metode 1:
-----------------------
SELECT Id
FROM tblUser
WHERE convert(varchar, Created, 101) = CONVERT(varchar, getdate(), 101)
-----------------------
Metode 2:
-----------------------
SELECT Id
FROM tblUser
WHERE Created BETWEEN getdate()-1 and getdate() AND datepart(d,Created ) = datepart(d,getdate())
|