Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2002
    Posts
    88

    Unanswered: date() funtion not working

    I'm trying to use the date() function in a query to return records newer than 45 days old (>date()-45).

    It isn't working.

    I've seen other posts that there may be a missing reference to an object library, but I don't see any that say missing. I've also tried runnint the same db on another computer and got the same results. I'm using Access XP Windows 2000

    This is really a simple query and database


    ????

  2. #2
    Join Date
    Sep 2002
    Location
    Land of OZ
    Posts
    173

    Re: date() funtion not working

    Where are you adding this ... I assume you are adding it to the criteria line ....

    It should work .... it requires no external lib references.

    Is the field type date/time?


    Originally posted by tmort
    I'm trying to use the date() function in a query to return records newer than 45 days old (>date()-45).

    It isn't working.

    I've seen other posts that there may be a missing reference to an object library, but I don't see any that say missing. I've also tried runnint the same db on another computer and got the same results. I'm using Access XP Windows 2000

    This is really a simple query and database


    ????
    Mona
    ________________________________
    Life is too short to be sane or sensible. Weird people rule and normal people suck

  3. #3
    Join Date
    Feb 2002
    Posts
    108

    Question Did you type like you posted (>date()-45) ?

    If so remove the outer set of parenthesis'

    Like this: >date()-45

    I use exact criteria in one of my query and it works perfectly.

  4. #4
    Join Date
    Oct 2002
    Posts
    88

    Re: Did you type like you posted (>date()-45) ?

    Originally posted by jkevin
    If so remove the outer set of parenthesis'

    Like this: >date()-45

    I use exact criteria in one of my query and it works perfectly.
    I didn't use outer parenthesis. I don't get an error it just doesn't do anything.

    I tried this database on another computer and got the same problem.

    I put toghether another query in another database using date() on this computer and it worked fine.

    I imported all the tables into a new database and it didn't work.

    There are two tables that have the date field I want to sort with. One has the format mm/dd/yy hh:nn. I try to sort using either one and it doesn't work.

    This is an attached database

    ????
    Last edited by tmort; 12-13-02 at 09:51.

  5. #5
    Join Date
    Oct 2002
    Posts
    88

    Re: date() funtion not working

    Originally posted by mona
    Where are you adding this ... I assume you are adding it to the criteria line ....

    It should work .... it requires no external lib references.

    Is the field type date/time?
    Yes, I am adding it to the criteria line. I've used it many times before elsewhere

  6. #6
    Join Date
    Oct 2002
    Posts
    88

    Date() Not working

    Date() was working fine. I had a multiline or criteria in another field and only one dae() criteria line. I don't usually do it this way

Posting Permissions

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