How to remove part of string after certain character + One Space

Hello,
sorry for the post perhaps too trivial for someone.
But with strings, I always have serious problems working.

I have this string:
MILAN (MI)

Where Milan is the name of the city, and (MI) is the abbreviation of the province.
I have to remove a space before the (and everything that comes after.

Basically, I only have to get the name of the city, considering that some cities have compound names and therefore contain spaces in between.
ex: NEW YORK (NY)

Can anyone help me with this? thks a lot…
Aaron

Hello,

You can try this:
Split(str_CityName,"(")(0).Trim

Thanks!
Athira

Thanks Athira… :slight_smile:
it works WeLL!! :slight_smile:

Super!!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.