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

74
Vistas
Unable to convert datetime string with AM/PM format in Firefox

I am receiving a datetime value from backend with and need to convert it to the Date object

The format of the datetime value is 2021-12-12 11:30 AM

I tried using this code which only works in Chrome, but gives "invalid date" error in Firefox

new Date('2021-12-12 11:30 AM')

My end goal is to calculate time past from the given date. I was using moment.js for this, but that doesn't work on Firefox. I have been searching online for solutions but no luck yet.

Any help would be appreciated. Thanks

about 4 years ago · Juan Pablo Isaza
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