title: Swift how to init Date
body: <p>I'm trying to create model object which has <code>Date</code> but I can't find out how to <code>init</code> in terms of converting to <code>String</code>.</p>
  
  <p>This is the date structure.</p>
  
  <pre><code>let date = NSDate()
  let format = DateFormatter()
  format.dateFormat = "yyyy-MM/dd HH:mm"
  let strDate = format.string(from: date as Date)
  </code></pre>
  
  <p>Model</p>
  
  <pre><code>import UIKit
  
      struct Post {
  
          var Date: Date!
          var Text: String
  
          init(dictionary: [String:Any]) {
              self.Date = dictionary["Date"] as? Date
              self.Text = dictionary["Text"] as? String ?? ""
          }
      }
  </code></pre>
  
  <p>After I fetch data from firebase, I would like to do like below but error says </p>
  
  <blockquote>
    <p>Cannot assign value of type 'Date.Type' to type 'String?'</p>
  </blockquote>
  
  <pre><code>var post: Post? {
          didSet {
  
              dateLabel.text = post?.Date
              caprionLabel.text = post?.Text
          }
      }
  </code></pre>
  
  <p>Does anyone know how can I fix this? 
  Thank you in advance!</p>