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.
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;