Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

125
Views
Changing date.now in mongoose schema to display date in this format" MMMM Do YYYY"

How to I update the date.now in mongoose schema to show only the date in this format "MMMM Do YYYY" the mongoose schema

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

the format i get in the database

date: 2021-09-21T13:02:49.856+00:00

how to i remove the T13:02:49.856+00:00 and change the format to "MMMM Do YYYY"

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You could extract the date first, using date.slice(0,10) on your date: 2021-09-21T13:02:49.856+00:00.Then you may want to convert it using a handy time-dealing library, like Luxon.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!