I thought this would work. Some of my tools I don’t have a date of purchase, so I thought the end result should be 0 or blank, not 51 years. The result is a blank field.
I have fields Purchased = (date), Today = (date).
IFNOTEMPTY(Purchased; (YEARS(Purchased;Today;)) )
Hi Glen,
You have an extra semicolon after today and you’re forgetting the ()
in TODAY()
.
And you also have a parenthesis before YEARS
which is not required. And then you don’t need 3 at the end.
Also, what does this have to do with looping? Just curious. Oh, also you need an else
part of the expression.
The IFNOTEMPTY() function takes 3 parameters.
IFNOTEMPTY(Purchase; YEARS(Purchased; TODAY()); 0)
or something like that. I don’t know what you want to return if Purchased
is empty.
It works, but as I feared, I notice these equations return integers, not actual decimal numbers indicating parts of an integer. I guess I have to do this in Script to get a real value???
I was able to get YEARS AND MONTHS, but not a real value, just an approximated value. Number Format is decimal with 2 places.
See pic attached.
Attachments:
You must be
logged in to view attached files.
Your formula from your screenshot is invalid. You’re missing semi-colons and you have a subtract character in there.
Please look at my earlier comment I was creating when you were posting a problem I was fixing.