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

123
Views
How to get users having birthday today in loopback?

I need to send birthday wishes to users in my application.

I have a table "userdetails" with the column "dob". I need a query to retrieve users having a date of birth matching today's date.

For example, if a user has a "dob" value "1991-01-21 00:00:00", I have to send a birthday email to the user.

const users = await userdetails.find({
 where: {
   dob: "  " // not sure what goes in there
 },
});

Here, I am not sure what I can put in the where field to match my query.

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

0

If column type is date, the code will probably be like this:

where: {
    dob: new Date().toISOString().slice(0,10), // '2022-01-25'
},
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!