Select Where Date Is Yesterday

How do I construct a SQL query where I select all items where a date field is yesterday?
Who is Participating?
Aneesh RetnakaranConnect With a Mentor Database AdministratorCommented:
You can use  " GETDATE() -1 " 

or like this

SELECT * from yourTable
WHERE select Convert (varchar(8),urDateColumn,112)   = select Convert (varchar(8),getdate()-1,112)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.