The following statement writes the current date to the text file opened in the File object fLog:

fLog.puts(dtoc(date()))

The puts( ) method expects a string.