title: How do I insert date in MongoDB using Golang?
body: <p>I have a struct with the following format. I am trying to insert <code>InvDt</code> as a Date in MongoDB. My dates are in the form <code>2020-09-25</code>.</p>
  <pre><code>type Statement struct {
    InvDt string `bson:&quot;invoice_date,omitempty&quot; json:&quot;invoice_date,omitempty&quot;`
  }
  </code></pre>
  <p>The insertion code is written as:</p>
  <pre><code>interfaceStmts := []interface{}{}
  for _, s := range stmts {
      interfaceStmts = append(interfaceStmts, s)
  }
  testCollection.InsertMany(ctx, interfaceStmts)
  </code></pre>
  <p>This is currently inserting as a String. How do I make it insert as a Date?</p>