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 283
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