Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following expression which works fine and converts to '2015'
=Date(AddMonths(Today()-12),'YYYY')
but when I modified it to:
=Date(AddMonths(Today()-12),'YYYY') x 12
I want it to take 2015 x 12 = 507936 instead of 24180.
How do I get it to look at the year as a number for this expression instead of a date?
Zag
You want it to return 12*2015 = 24180?
Then just calculate a year value, not a formatted date:
=Year(AddMonths( Today(),-12)) *12
If you want it to return 507936, that's what your expression already does:
=Date(AddMonths( Today(),-12)) *12
Maybe something like
=num(AddMonths(Today(),-12)) * 12
You want it to return 12*2015 = 24180?
Then just calculate a year value, not a formatted date:
=Year(AddMonths( Today(),-12)) *12
If you want it to return 507936, that's what your expression already does:
=Date(AddMonths( Today(),-12)) *12
(Year(Today())-1)*12
for 24180:
calculate a year value, not a formatted date:
=Year(AddMonths( Today(),-12)) *12
for 507936:
=Date(AddMonths( Today(),-12)) *12
Regards
Hemanth