I am using mysql database,in that i have a field by name request_date. The type of the field is time stamp and the data stored in this field has the format 20
request_date
20
Here is the solution :
var datetme = new Date().toLocaleString();
OR
const DATE_FORMATER = require( 'dateformat' ); var datetme = DATE_FORMATER( new Date(), "yyyy-mm-dd HH:MM:ss" );