Need to get records within a week

  • Hi All,

    I need to get the records from a table within a particular FROM and TO date. For example in a table am having no of records with various dates. But i need to get the records within a this date to this date. How can I get it..

    Thanks & Regards,

    sweet

  • saravananr (4/14/2009)


    Hi All,

    I need to get the records from a table within a particular FROM and TO date. For example in a table am having no of records with various dates. But i need to get the records within a this date to this date. How can I get it..

    Thanks & Regards,

    sweet

    Hi Saravanan,

    Use between the from date and todate in the where condition

    ARUN SAS

  • Another easy way:

    SELECT Field1, Field2, ...

    FROM YourTable

    WHERE FieldDateTime >= @StartDate

    and FieldDateTime <= @EndDate

  • Hi All,

    Thanks for your reply.. I got it... Once again thanks

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

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