Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2012
    Posts
    20
    Provided Answers: 3

    Answered: Query to pull all fields with an expiry date

    Hello,

    I have a query with with about 40 expression generated expiry dates, how do I create a query to show all units that expire on a particular mm/yyyy format?


    Dave

  2. Best Answer
    Posted by DFeil

    "I don't think that will work the Expiry Dates were generated in a query based off of an inspection date and years remaining field from the table. There are no expiry dates in the table. Any other thoughts...


    Dave"


  3. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    SELECT my, column, list FROM mytable
    where expiry_date <= #2015/10/30#

    ...assuming that your date value expiry date is a datetime variable/datatype and not a string
    ...also bear in mind that a relatuional database, when designed properly doens't care overmuch about the presentation / formatting. In Access, like most relational DB's datetiem values shoudl be stroed in a datetime datatype NOT as text. Although Access does default to the US date format mm/dd/yyyy for date tiem literals, its alwasy smarter to use the ISO format yyyy/mm/dd

    using the datetime datatype means you can use the datetime functions
    I'd rather be riding on the Tiger 800 or the Norton

  4. #3
    Join Date
    Oct 2012
    Posts
    20
    Provided Answers: 3
    I don't think that will work the Expiry Dates were generated in a query based off of an inspection date and years remaining field from the table. There are no expiry dates in the table. Any other thoughts...


    Dave

  5. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Ill just dust down my crystal ball and divine what your design is....

    If you derive the expiry date then do that in the above query
    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
  •