Posted on 2011-10-19
Last Modified: 2012-05-12
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.
Question by:VBdotnet2005
    LVL 7

    Expert Comment

    --try this
     Select *from mytable where CONVART(VACRHAR,Datereturned,101) = CONVERT(VARCHAR,getdate() ,101)
    LVL 7

    Accepted Solution

    --Sorry Typo error
    --try this
     Select *from mytable where CONVERT(VARCHAR,Datereturned,101) = CONVERT(VARCHAR,getdate() ,101)

    Author Comment

    that works. Thank you

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Recently, I had the need to build a standalone system to run a point-of-sale system. I’m running this on a low-voltage Atom processor, so I wanted a light-weight operating system, but still needed Windows. I chose to use Microsoft Windows Server 200…
    ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now