How can I do operations with dates?

Goodnight. Apparently I didn’t find anything about what I need, so I decided to ask. I am programming an app where I need to add and subtract a few days from the dates that are chosen in the app. For example, today’s date I need to add 10 days to get other data from the app. And from today’s date also find the day 3 months before and 3 months later. But I can not do operations with dates. Can you help me please.? Thanks in advance.

I have the same problem. I have worked around it. But I will unfortunately need to implement something along the lines of the calculation described at https://en.wikipedia.org/wiki/Julian_day#Converting_Gregorian_calendar_date_to_Julian_Day_Number

JDN = (1461 × (Y + 4800 + (M − 14)/12))/4 +(367 × (M − 2 − 12 × ((M − 14)/12)))/12 − (3 × ((Y + 4900 + (M - 14)/12)/100))/4 + D − 32075

I could not find a Web API with a datediff function. But I’ll keep watching this thread to see if someone has a better solution. :crossed_fingers:

1 Like

Hey @preyescejudovi do you found a solution to this?

I´m traying to do something similar

1 Like

Get seconds since 1970 and manipulate it with connected Google sheet

2 Likes