Subtract Years and show date

Hi

Im wanting to use a formula to subtract X amount of years from todays date and show the date with day, month and year. 
Does anyone have a clever solution for this problem? 

 

Best regards 

Solved Solved
0 2 129
1 ACCEPTED SOLUTION

Aurelien
Google Developer Expert
Google Developer Expert

Hi @RybJ 

 

According to this:

https://help.appsheet.com/en/articles/2430932-eomonth

 

I would suggest:

EOMONTH(TODAY(), -1 +[numbersOfYearsForward]*12) + DAY(TODAY()) 
or
EOMONTH(TODAY(), -1 -[numbersOfYearsBackward]*12) + DAY(TODAY()) 

This will return a date.

You can enclose  it with 

TEXT([DateResult],"dddd mm yyyy")

if necessary

View solution in original post

2 REPLIES 2

Aurelien
Google Developer Expert
Google Developer Expert

Hi @RybJ 

 

According to this:

https://help.appsheet.com/en/articles/2430932-eomonth

 

I would suggest:

EOMONTH(TODAY(), -1 +[numbersOfYearsForward]*12) + DAY(TODAY()) 
or
EOMONTH(TODAY(), -1 -[numbersOfYearsBackward]*12) + DAY(TODAY()) 

This will return a date.

You can enclose  it with 

TEXT([DateResult],"dddd mm yyyy")

if necessary

Hi! 
Thanks, that worked wonders! 

Top Labels in this Space