I\'m using Jade to render my views from within Express.js. I am saving documents in MongoDB and using Mongoose to access my documents. I am saving a default date created when a
very easy method steps-
install via npm moment --save
declare var moment = require('moment');
define the declare variable in res.render'filename.ejs',{moment: moment});
put this ejs in your view file <%= moment(data.column_name_of_your_date).format( 'DD MMM YYYY'); %>
output is -- 09 Jun 2017
you can changed the format check it out in moment link for different format http://momentjs.com/