Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
zagzebski
Creator
Creator

Getting years as a number, not date

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

1 Solution

Accepted Solutions
swuehl
MVP
MVP

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

View solution in original post

4 Replies
Anonymous
Not applicable

Maybe something like

    =num(AddMonths(Today(),-12)) * 12

swuehl
MVP
MVP

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

MarcoWedel

(Year(Today())-1)*12

hemanthaanichet
Creator III
Creator III

for 24180:

calculate a year value, not a formatted date:

=Year(AddMonths( Today(),-12)) *12

for 507936:

=Date(AddMonths( Today(),-12)) *12

Regards

Hemanth