Link to home
Start Free TrialLog in
Avatar of WO2015
WO2015

asked on

Only export parts of a field in ACCESS

Hello,

I have a long paperless not field and only need certain parts of it is there a way to pull only characters 10-15 say. Or maybe after the first (space)?  Thank you.
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

you can use the Left(), Mid() function to extract part of the field

this will give all info after the first space

mid([fieldname], instr([FieldName]," ") +1)

sample
the quick brown fox

will return
quick brown fox

using the mid() function posted above
Avatar of WO2015
WO2015

ASKER

Here is what I have, I am having a hard time getting that to work:

The field contains: 9:20 15:22 313/555-5555 P

I need to extract the 15:22 (which is a call duration) for all of my accounts. The 9:20 time may be 10:50 and have an extra character at times, which is why I asked about the (space).

I am getting a sytax error: (comma) in query expression. Below is my build line of logic:

CallLength: (mid([PREVWeekPAPERLESS], instr[PAPERLESS_CMT1]," ")+1)
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of WO2015

ASKER

Worked, thank you!  Just so I understand the code, what does the +1 and ,5 represent?
+1, to select the character after the space
5 the length of the string you want to get
Avatar of WO2015

ASKER

Thanks again, have a great day.