title: How to convert Date to String in Swift
body: <p>I'm trying to call a function one argument is current time and Date and other is a file name, They both are strings. How can I convert <code>Date()</code> to a string. I tried:</p>
  
  <pre><code>writeToFile(content: Date(), fileName: "jm.txt")
  </code></pre>
  
  <p>but it gave me error:</p>
  
  <blockquote>
    <p>Cannot convert value of type 'Date' to expected argument type 'String'</p>
  </blockquote>