title: How to create a file name with current date & time in lua?
body: <p>I want to write a table into a file which named by the date and time it created.
  I can open a file with hard coded name, write the table into it, like below:</p>
  
  <pre><code>FILENAME_EVENTS="Events.txt"            -- filename in string
  local fp=io.open(FILENAME_EVENTS, a)        -- open a new file with the file name
  io.output(FILENAME_EVENTS)      -- redirect the io output to the file
  -- write the table into the file
  for i, e in ipairs(eventlist) do io.write(e.title, e.category, e.ds, e.de, e.td) end
  </code></pre>
  
  <p>But when I try to:</p>
  
  <pre><code>FILENAME_EVENTS=os.date().."\.txt"          -- filename in string with date
  local fp=io.open(FILENAME_EVENTS, a)        -- open a new file with the file name
  io.output(FILENAME_EVENTS)      -- redirect the io output to the file
  -- write the table into the file
  for i, e in ipairs(eventlist) do io.write(e.title, e.category, e.ds, e.de, e.td) end
  </code></pre>
  
  <p>I got an error
   bad argument #1 to 'output' (10/06/11 17:45:01.txt: Invalid argument)
  stack traceback:
      [C]: in function 'output'</p>
  
  <p>Why this "10/06/11 17:45:01.txt" is an invalid argument? due to it contains spaces or '/'? Or any other reasons?</p>
  
  <p>BTW, the platform is win7 Pro + Lua 5.1.4 for win</p>