SQL Query to search DateTime Value

SELECT * FROM dbo.UserAction
WHERE CONVERT(CHAR(10),ActionDtTm,120) = '2011-10-04'


SELECT * FROM dbo.UserAction
WHERE ActionDtTm >= '2011-10-04' AND ActionDtTm < '2011-10-06'

No comments:

Post a Comment