date compare

  • I have a table that has a date colum (expDate), I'm trying to pull out the data where the expdate is not greater or equal to today, however, its pulling everything back.

    select news, group from tbl_News where published = 1 and group = @group and expDate >= GetDate()

    order by modifiedDate

    and even though i have rows with a expDate of 2/12/2010, its pulling everything back, am I missing something? Do I have to cast my date column in the query?

  • I think i just fixed it, i changed the order of my where clause and it appears to be working now.

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

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