title: mongoose how to set date format in model
body: <p>I am new for mongoose. I am using <strong>"Date"</strong> as type for my <strong>"holidayDate"</strong> column. I want to store only date not time in my <strong>"holidayDate"</strong> column so is there any way to define date format in domain model so when my domain is save my <strong>"holidayDate"</strong> column value will save according to the date format of domain model. </p>
  
  <pre><code>var HolidaySchema = new Schema({
      holidayName: {
          type: String,
          default: '',
          required: 'Please fill holiday name',
          trim: true
      },
      holidayDate: {
          type: Date,
      required: 'Please fill From Date'
      }
  
  });
  
  mongoose.model('Holiday', HolidaySchema);
  </code></pre>