adding a from string to datetime function