G
Guest
Good morning,
I am trying to write a formula in my Select query to extract a piece of data
from a field called "A". The format of the data (for most records) for field
A is "AAA BBBB 200x". What I like to extract is the date portion of the
field, which would be "200x" from the above example. Additionally, some
records the date can be 6-digit (e.g. 06200x) and my not always be at the end
of the field. Also a few records may have more than 3 components (e.g. "AAA
BBBB CCC 06200x").
Ideally, I would like to extract the date piece from the field no matter
where they are located. Since the date piece is located at the end for most
records, I am happy with just to get from most records.
The formula that I have tried to use is:
Mid(Trim([A]![A]),1,InStrRev(Trim([A]![A])," "))
For some reason, I keep getting a Data Mismatch error.
Please help!
Thanks.
I am trying to write a formula in my Select query to extract a piece of data
from a field called "A". The format of the data (for most records) for field
A is "AAA BBBB 200x". What I like to extract is the date portion of the
field, which would be "200x" from the above example. Additionally, some
records the date can be 6-digit (e.g. 06200x) and my not always be at the end
of the field. Also a few records may have more than 3 components (e.g. "AAA
BBBB CCC 06200x").
Ideally, I would like to extract the date piece from the field no matter
where they are located. Since the date piece is located at the end for most
records, I am happy with just to get from most records.
The formula that I have tried to use is:
Mid(Trim([A]![A]),1,InStrRev(Trim([A]![A])," "))
For some reason, I keep getting a Data Mismatch error.
Please help!
Thanks.