• Extracting Year with Parameter query

    Author
    Topic
    #458916

    I need help extracting a year from a short date format field in a query. I thought typing:

    Year([SaleDate])

    would allow the user to type in 2008 for example to retrieve records for that year for customer sales in a parameter prompt box…, but it’s not prompting me for anything.

    Could you please help ASAP

    Viewing 0 reply threads
    Author
    Replies
    • #1155598

      In your query, I would create a field called year….year:right([nameofdatefield],2) to pull out the 2 digit year.
      Then prompt the user to enter the year…[Enter 2 digit year] in the criteria field.

      HTH….

      • #1155605

        In your query, I would create a field called year....year:right([nameofdatefield],2) to pull out the 2 digit year.
        Then prompt the user to enter the year...[Enter 2 digit year] in the criteria field.

        HTH....

        Thank you Deborah. I solved it while waiting...did it like you said, just didn't add the ,2 portion as it wasn't needed. Love you folks so much!

    Viewing 0 reply threads
    Reply To: Extracting Year with Parameter query

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

    Your information: