Selecting records based on supplied dates..?

  • I have a large database containing customer records, along with one column which is a date field. All fields are set as VARCHAR.

    I need to select/export records based on this date field - any customer which has a date in the last three years is required.

    Please help!

    Cheers, TH

  • Tony

    Check out GETDATE(), DATEDIFF and CAST in Books Online.

    John

  • Also look at isdate() in the BOL. If the value can not be converted to a valid date you are going to have some issues as well.

    Henry

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

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