Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Mar 2001
    Posts
    165
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Query criteria for expiration date (2002 SP-2)

    I'm trying to do a query of a table with credit card information. The expiration dates are listed in the format mm/yy as text, although if the month is a single digit, I input a space rather than a zero. How would I phrase the criteria to return only valid dates (i.e., those 1/05 or later)? Some listed expiration dates are older, but I don't want to eliminate them from the database.
    Clark

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

    Re: Query criteria for expiration date (2002 SP-2)

    Create a calculated column in the query:

    ExpirationYear: Right([ExpirationDate],2)

    Substitute the actual name of the expiration date field. Clear the Show check box for this column, and set the criteria to

    Between "05" And "50"

    (the upper limit is to avoid including expiration dates in the last century)

  3. #3
    2 Star Lounger
    Join Date
    Mar 2001
    Posts
    165
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query criteria for expiration date (2002 SP-2)

    Hey, it worked! Thanks.
    Clark

Posting Permissions

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