Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

518
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda