title: Create a text file with date and time as the filename
body: <p>I'm trying to create a text file with Visual Studio in VB.Net, and I want the filename to be the current date and time.</p>
  
  <p>I have this code:</p>
  
  <pre><code>Dim d As System.DateTime
  DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss")
  Dim filepath As String = d + ".txt"
  If Not System.IO.File.Exists(filepath) Then
      System.IO.File.Create(filepath).Dispose()
  End If
  </code></pre>
  
  <p>But every time I use <code>d</code> it gives me the <code>System.NotSupportedException</code> error. I can only create a text file by specifying the filename. How can i fix it and make my text file's name the current date and time?</p>