Comparing datetime column with todays date

  • Hi!

    Pl. help me to compare the datetime column with today's date (using getdate() function) in the where clause.

     

    Suppose if I compare using = , since the time is not matching, i am not able to fetch the records.

    Regards

    Charles.

     

  • Charles

    I think we need some more information before we can help!

     

    Are you trying to match a record in your table with the exact date and time as the date and time found using getdate(), or is it simply records with the same date?

     

  • Search the forum. There are plenty of threads on how to strip the time off a datetime or how to do search an compare on datetimes.

     

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply