I am saving data in MongoDB server from Node.js application (using Mongoose).
Consider following code:
var mongoose = require(\'mongoose\'); var Schema =
Mostly use for formatting date and time (Human Readable). You can also use toLocaleDateString()
var event = new Date(Date.UTC(2012, 11, 20, 3, 0, 0)); var options = { weekday: 'short', year: 'numeric', month: 'short', day: 'numeric' }; console.log(event.toLocaleDateString('en-US', options));