First of all, I suggest you to read the article about
opening txt files if you don’t know how to already
(use the Output keyword instead of Input to start writing to a file or Append to
add text to it). Use the Time function to get the time. The function returns a
String variable like the following: