title: What is the best way to store dates in MongoDB?
body: <p>I am just starting to learn about MongoDB and hoping to slowly migrate from MySQL.</p>
  
  <p>In MySQL, there are two different data types - <code>DATE ('0000-00-00')</code> and <code>DATETIME ('0000-00-00 00:00:00')</code>. In my MySQL, I use the <code>DATE</code> type, but I am not sure how to transfer them into MongoDB. In MongoDB, there is a <code>Date</code> object, which is comparable to <code>DATETIME</code>. It seems it would be most appropriate to use <code>Date</code> objects, but that would be wasting space, since hours, min, sec are not utilized. On the other hand, storing dates as strings seems wrong.</p>
  
  <p>Is there a golden standard on storing dates <code>('0000-00-00')</code> in MongoDB?</p>