• Query criteria for expiration date (2002 SP-2)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Query criteria for expiration date (2002 SP-2)

    Author
    Topic
    #413719

    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

    Viewing 1 reply thread
    Author
    Replies
    • #914690

      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)

    • #914691

      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)

    Viewing 1 reply thread
    Reply To: Query criteria for expiration date (2002 SP-2)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: