I have a custom post type called 'events' with around 700 posts, the titles are consistently formatted like this:
Event Title - January 1st 2019
I need to isolate the date in another field. I am using Advanced custom fields and have added a date field to the events custom post type.
I need to write a script to extract the date from each title and insert it into the custom field.
How would I do this? I have tried writing SQL statements but just cant get it to work. I need some guidance.