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
i got this working by requiring the library or module called date format. first we have to install date format package using
npm install dateformat
then u can require it in ur coding. then u can create the object of retrieved data as
var day=dateFormat(result.request_date, "yyyy-mm-dd h:MM:ss");
and print it.