Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Posts
    26

    Question Unanswered: Trying to obtain past dates

    Hi,

    I have a date column and I am trying to build a query that will give me the dates > 48 hours ago (in the past).

    For example using todays date 2006.10.05 and time 23:00 I would be looking for the dates prior to 2006.10.03 and time 23:00.

    Your help is greatly appreciated!

    Thanks!

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Code:
    SELECT thisColumn, thatColumn, theOtherColumn
       FROM myTable
       WHERE theDate < DateAdd(hour, -48, GetDate())
    -PatP

  3. #3
    Join Date
    Jan 2004
    Posts
    26
    Thanks Pat!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •