Created function to append the date-time to a string