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

233
Vistas
Date in Google App Scrip (Make de calculation using 2 Date and return the numer of da days)

I just want to make a simple calculation using 2 Dates.

Ex: in the Sheet Cell A1 = 10/11/2021 and cell A2 = 12/11/2021

The function takes the date and calculation (10/11/2021 - 12/11/2021) and returns in Cell A3 the number 2.

This sounds very easy, but I can't do this probably because of the format of the Date that I can't change.

Please let me know the solution.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

When you do calculation on the date objects, they would be converted into milliseconds, so the following would give you the difference in days:

  const diff = (d2 - d1) / 1000*60*60*24;
about 4 years ago · Juan Pablo Isaza 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