typo in datetime function