Extract non-adjacent digits from a string

Ports

Registered User.
Local time
Yesterday, 22:40
Joined
Jun 30, 2019
Messages
64
Hi,


I've got a field with records as follows:
17/18RO
18/19RO
17/18RO
16//17RO


It's all consistent: 2 digits / 2 digits RO


I'm trying to extract just 1718 or 1819 or 1617 in a query (basically the 4 digits)


I've tried val([field]) but it only returns the first 2 digits.


Please advise. Thank you
 
Lovely. Thank you.
 
Note that Val() returns a number so any leading zeros will be dropped.
If this matters you can use this which will return a string:
Code:
Left([field],2) & Mid([field],4,2)
 

Users who are viewing this thread

Back
Top Bottom