clock1
asked on
How to find and store 4-digits in a string
I have a Table with 2 fields of different data types: Location (Text), Date (Date).
Currently, the Date field is empty.
Is there a way to populate the Date field with the 4 numbers contained in the Location field and concatenate "1/1/" before 4 numbers.
The 4 numbers always appear adjacent and can be anywhere within the Location field.
See current state (BEFORE) and desired state (AFTER), below.
BEFORE:
ID Location Date
1 c:\red\white\blue\red1844\ green\snac k1.doc
2 c:\yellow\green\wheat2015. bmp
3 c:\gr1995een\orange.jpg
AFTER:
ID Location Date
1 c:\red\white\blue\red1844\ green\snac k1.doc 1/1/1844
2 c:\yellow\green\wheat2015. bmp 1/1/2015
3 c:\gr1995een\orange.jpg 1/1/1995
Currently, the Date field is empty.
Is there a way to populate the Date field with the 4 numbers contained in the Location field and concatenate "1/1/" before 4 numbers.
The 4 numbers always appear adjacent and can be anywhere within the Location field.
See current state (BEFORE) and desired state (AFTER), below.
BEFORE:
ID Location Date
1 c:\red\white\blue\red1844\
2 c:\yellow\green\wheat2015.
3 c:\gr1995een\orange.jpg
AFTER:
ID Location Date
1 c:\red\white\blue\red1844\
2 c:\yellow\green\wheat2015.
3 c:\gr1995een\orange.jpg 1/1/1995
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanks, Bill.
I have updated the code.
I have updated the code.
ASKER
Thanks
ASKER