I\'m using Mongoose, MongoDB, and Node.
I would like to define a schema where one of its fields is a date\\timestamp.
I would like to use this field in order
var ItemSchema = new Schema({ name : { type: String } }); ItemSchema.set('timestamps', true); // this will add createdAt and updatedAt timestamps
Docs: https://mongoosejs.com/docs/guide.html#timestamps