Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Feb 2006
    Posts
    71
    Thanks
    1
    Thanked 0 Times in 0 Posts

    criteria based on time (2003)

    Have a field that defaults to time() when records entered. I want to query for records that have been entered in the last 10 minutes. I have tried criteria: >time()-10 but it goes back farther in time than 10 minutes. I'm using short time format

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: criteria based on time (2003)

    Dates and times are stored with 1 day as unit, so -10 would mean minus ten days! You could use

    >DateAdd("n",-10, Time())

    Note: I would use Now() instead of Time() both in the default value of the field and in the above expression. Time() is only the time, you can't see whether it's today or yesterday. Now() includes both the data and time.

Posting Permissions

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