Modified code to write the temperature value, date and time to the new Temperature table.