Updated the code to add date time