I have a field contains owners name
Doe, John and Jane
I am trying to remove everything so just the last name shows
Doe
I have tried several codes but nothing is working so far. I have Desktop 10.4
Could anyone give me some help please?
Solved! Go to Solution.
python parser in the field calculator, no need for a codeblock if it is a text field
!YourFieldName!.split(",")[0]
Guessing you are using the field calculator, add a little Pre-Logic code:
def justname(txt): return txt[0: txt.find(',')]
Thank you! It worked
python parser in the field calculator, no need for a codeblock if it is a text field
!YourFieldName!.split(",")[0]
Thank you! I really appreciated the help.