Best course of action would be to reset the API call to give you a date format instead of the string. That way you avoid possible errors of techniques such as regex or split by.