Not able to store NSDate in realm
<p>I know very basic question but am really struggling to do it. Please help me.</p>

<p>I have a realm object with <code>NSDate</code> datatype properties.
But how to insert date in that column.</p>

<pre><code>class Log : Object
{

    dynamic var id : Int = 0
    dynamic var icn : Int64 = 0
    dynamic var status : String = ""
    dynamic var date : String = ""
    dynamic var timeIn = NSData()
    dynamic var timeOut = NSDate()
    dynamic var pauseAt = NSDate()
    dynamic var breakTime : Int = 0
    dynamic var spentMinutes : Int = 0
    dynamic var lati : Double = 0.0
    dynamic var longi : Double = 0.0
    dynamic var synced = false


    override static func primaryKey() -&gt; String? {
        return "id"
    }

}
</code></pre>