split field

kolait

Registered User.
Local time
Today, 18:36
Joined
Oct 11, 2019
Messages
60
Hello
I have a field like the one below that I want to divide into three fields. Thanks for helping me. my office is 2019
25/12/1
7/9/15
78/12/21
 
Hi kolait. If you're trying to do this in a query, as the forum title implies, then; unfortunately, you won't be able to use the Split() function directly. If you only have three elements to split, then you might be able to use a combination of the Left(), Mid(), and InStr() functions. Otherwise, you will have to create a custom function to wrap the Split() function in that you can then use in your query.
 
Last edited:
Hi kolait. If you're trying to do this in a query, as the forum title implies, then; unfortunately, you won't be able to use the Split() function directly. If you only have three elements to split, then you might be able to use a combination of the Left(), Mid(), and InStr() functions. Otherwise, you will have to create a custom function to wrap the Split() function in that you can use in your query.

thank you.
I just got this out. I couldn't do it for the rest
Left([feild],InStr([feild,"/")-1)
 
It does exist in all versions of Office including 2019/365.
However its VBA only. it can't be used directly in a query (unless called from another function).
 
thank you.
I just got this out. I couldn't do it for the rest
Left([feild],InStr([feild,"/")-1)
Try this one:
Code:
Mid([field],InStr([field],"/")+1,InStr(Mid([field],InStr([field],"/")+1),"/")-1)
(untested)
 
It does exist in all versions of Office including 2019/365.
However its VBA only. it can't be used directly in a query (unless called from another function).

thank you
I wish they could be used directly in the query
 
thank you so much
What to do for the right?
Hi. I'm surprised that worked without testing. For the right, it's much easier.
Code:
Mid([field],InStrRev([field],"/")+1)
 
I tried this but it made an error

It does work. Perhaps you used it incorrectly.
Even though you have a solution, I would recommend trying it again as it is so useful.
If you still get an error please provide details / screenshots
 
It does work. Perhaps you used it incorrectly.
Even though you have a solution, I would recommend trying it again as it is so useful.
If you still get an error please provide details / screenshots

thank you
I managed to do it.
You and many other friends have helped me a lot. Thank you all
 

Users who are viewing this thread

Back
Top Bottom