title: How to Insert Date (as Date DataType) In Mongo from 'Mongo Command Prompt' & From 'mongoimport'
body: <p>MongoDB shell version: 2.0.4</p>
  
  <p>Want to insert date as 'date datatype' from mongo command line.</p>
  
  <pre><code>db.my_date_collection.insert(
  {"user_id" : 91,
  "event_timestamp" :new Date("09-AUG-12 05.30.28.402000 AM")
  });
  </code></pre>
  
  <p>Above query add record but change date from "09-AUG-12 05.30.28.402000 AM" to "1970-01-01T00:00:00Z"</p>
  
  <pre><code>&gt; db.my_date_collection.findOne()
  {
      "_id" : ObjectId("54168ddc289a635d725d86fb"),
      "user_id" : 91,
      "event_timestamp" : ISODate("1970-01-01T00:00:00Z")
  }
  </code></pre>
  
  <p>Plus it also didn't save 'date data' as date 'datatype'</p>
  
  <pre><code>typeof db.my_date_collection.findOne().event_timestamp;
  
  
  object
  </code></pre>
  
  <p>Can someone help me insert data as date type from mongo prompt?</p>
  
  <p>Additionally can some one tell me how to insert the 'date as date datatype type' from a tsv file? as i  got the same issue in loading tsv from mongoimport.</p>
  
  <p>Thanks </p>