Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

217
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda