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

516
Views
Sequelize - dateonly vs date format

If I store timestamp 1625555827900 in 2 separate fields whose format are dateonly and date, will there be any difference?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You can not store the unix timestamps in both of the fields as their types are DATEONLY and DATE. Sequelize will through an error

DatabaseError [SequelizeDatabaseError]: date/time field value out of range: "1625555827900"

First you need to format the date like Tue Jul 06 2021 07:55:33 or 2021-07-06 07:55:33 in your code. In that case, it will save the complete date 2021-07-06 07:55:33.000000 for DATE field and skip the time part for DATEONLY field 2021-07-06.

Or you can use BIGINT instead if you are intended to store the unix timestamps.

over 4 years ago · Santiago Trujillo 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!