I have a column called
datetime datatype. I want to extract data between today and yesterday.
select * from table1(nolock) where createdate ='2018-06-01' --not getting any output
I want something like this:
select * from table1(nolock) where createdate between '2018-06-01' and '2018-06-02'
Rather than hard coding the date, I need between
dateadd(d,-1,getdate()) and getdate(), but
getdate() gives current timestamp. How can I search for the whole day like
2018-06-02 rather than