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

236
Views
What is The Best way to get date value in JavaScript to send in MongoDB.?

I want to get the date value from React and want to send it to MongoDB using Node.js. What is the best way to get the date value that is suitable for sending to MongoDB.?

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

0

May be like that:

const tourSchema = mongoose.Schema({
      title: String,
      description: String,
      name: String,
      creator: String,
      tags: [String],
      imageFile: String,
      **createdAt: {
        type: Date,
        default: new Date(),
      },**
      likes: {
        type: [String],
        default: [],
      },
    });

ignore **

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!