How to get date in JSON format with Node.js

1 Answer

0 votes
const json = new Date().toJSON();

console.log(json);


   
  
  
/*
run:
  
2022-03-15T07:35:23.110Z
  
*/

 



answered Mar 15, 2022 by avibootz

Related questions

1 answer 119 views
1 answer 171 views
1 answer 165 views
1 answer 158 views
1 answer 136 views
...