datetime

This is how I store my date in a table
2011-10-19 08:15:44.490

I want to query and get today's date only. Select *from mytable where Datereturned = getdate()  won't work.
VBdotnet2005Asked:
Who is Participating?
 
Chandan_GowdaConnect With a Mentor Commented:
--Sorry Typo error
--try this
 Select *from mytable where CONVERT(VARCHAR,Datereturned,101) = CONVERT(VARCHAR,getdate() ,101)
0
 
Chandan_GowdaCommented:
--try this
 Select *from mytable where CONVART(VACRHAR,Datereturned,101) = CONVERT(VARCHAR,getdate() ,101)
0
 
VBdotnet2005Author Commented:
that works. Thank you
0
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.