Pergunta de entrevista da empresa Altea Healthcare

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