javascript - MySQL: date format changed when retrieving it by node.js -




i have made table personal information dob "date" type. when select entire table in terminal, shows correct format(yyyy-mm-dd). however, when created connection through node.js , output console, printed json object dob has hh-mm-ss behind actual date?

for example 1 of column has dob "1996-03-06". however, when passed node.js server , printe console log, became "1996-03-0605:00:00.000z"

what more strange when send information ajax print web, output this: wed mar 06 1996 00:00:00 gmt-0500 (est), different both actual data , data shown in console

just print or send in ajax whatever need date object

console.log(dob.toisostring().slice(0,10)) 




wiki

Comments

Popular posts from this blog

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -

Asterisk AGI Python Script to Dialplan does not work -