I have the following code.
const Price = mongoose.model('Price', new mongoose.Schema({
  dateFrom: {
    type: Date,
    required: true
  },
  dateTo: {
    type: Date,
    required: true
  }
}));
In the database they are stored with the format i.e 2018-12-29T00:00:00.000Z. What I would like to do is to store the as 2018-12-29. Is there any way to do this?