• extracting data from the middle of a value

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » extracting data from the middle of a value

    Author
    Topic
    #480234

    I am trying to extract the 04 from the value 20110402A in a query. The field is called AptID. I only want the value in the 04 place holder to display for all records. I know you can use Left$ and Right$ to trim data but i have never tried to extract a value in the middle. Any suggestions? Thanks…

    Viewing 0 reply threads
    Author
    Replies
    • #1308376

      If the bit you want is always in positions 5 and 6, you can use the Mid function.
      MonthNumber: Mid([AptID],5,2)
      Extract 2 characters starting at the fifth character, from APTID.

    Viewing 0 reply threads
    Reply To: extracting data from the middle of a value

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

    Your information: