Results 1 to 4 of 4

Thread: help with dates

  1. #1
    Join Date
    Apr 2005
    Posts
    44

    Unanswered: help with dates

    hiya guys.

    I'm having a little trouble with a criteria on one of my queries.

    What I would like to do is show records which are a month other due and also which records are due in a month so i am guessin i need some criteria which pulls out dates which are 31ish days in the past and 31ish days in the future.

    effectively wat i want is something that can tell me things that are overdue from the previous month and stuff which is likely 2 be due in the current month.

    i tried something like >=Date()-30 And <=Date()+30
    but that doesnt seem 2 work

  2. #2
    Join Date
    Jul 2004
    Location
    Southampton, UK
    Posts
    368
    Quote Originally Posted by netherton
    i tried something like >=Date()-30 And <=Date()+30
    but that doesnt seem 2 work
    That should work ok providing your date is a date/time data type (rather than say text).
    Chris

  3. #3
    Join Date
    Apr 2005
    Posts
    44
    thanks, got it to work in the end ok next challenge....... now that i can filter these dates out i have marked them with either Overdue or Due soon using the following:

    status: IIf([valid_till]<=Date(),"Overdue","Due Soon")

    which works a treat. I'm now wondering if i can use my query to count the number of those marked with "Overdue"

    ANY IDEAS????

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    theoretically yes
    have a look at the sum() function and the group by / having clauses of SQL
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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