Pregunta de entrevista de Altea Healthcare

How to extract datetime in a string in Javascript without using any libraries.