0

I have a CommentModel document

date: {
        type: Date,
        default: Date.now
      } 

it returns this 2021-08-30T03:30:54.446Z. I wanna convert to something like this 2021-08-30 hh:mm:ss, so what should i do? Thank u in advance!

Shina
  • 9
  • 1
  • Does this answer your question? [Convert string date to utc](https://stackoverflow.com/questions/38128079/convert-string-date-to-utc) – Dhana D. Aug 30 '21 at 04:01
  • Please also check this: https://stackoverflow.com/questions/15141762/how-to-initialize-a-javascript-date-to-a-particular-time-zone – Dhana D. Aug 30 '21 at 04:01

0 Answers0