Adding datetime class in place of plain string

- updated string to datetime