Can someone help with time and date function?

We need an expression that can calculate date based on number of months that we input.

for example
date: 21.06.2021
number of months:18
result date : date + 18 months (exact date)

0 8 297
8 REPLIES 8

Aurelien
Google Developer Expert
Google Developer Expert

Hi @ns_soft_studio1

You may find your desire here:

nope tried it, but tnx.

Hi @ns_soft_studio1

You may want to look further to the previous link.

Assuming:

  • [date] is your initial value
  • [offsetMonth] is the number of months

According to this documentation, which comes from previous link:

What about:
EOMONTH([date], [offsetMonth]-1) + 1 + DAY([date])

Hi, tnx this works…

Yes.
You may want to remove the +1 though.
So, correct expression will be:
EOMONTH([date], [offsetMonth]-1) + DAY([date])
I was doing it on a sandbox app to give it a try, as you said initially that didn’t work

Happy to help

did that it worked like a charm…
Thanks a lot

So you didn’t really try?

yea i did, read everything that was there and tried what seamed to be ok, but in my case it didn’t work until Aurelien wrote that massage with actual code.
and it was different link
Thanks again @Aurelien, you are the best

Top Labels in this Space