- This topic has 5 replies, 2 voices, and was last updated 2 years, 8 months ago by
Glen Forister.
-
AuthorPosts
-
February 24, 2023 at 7:32 PM #49026
Glen ForisterParticipantI 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;)) )-
This topic was modified 2 years, 8 months ago by
Glen Forister.
February 25, 2023 at 10:56 AM #49031
BrendanKeymasterHi Glen,
You have an extra semicolon after today and you’re forgetting the
()inTODAY().And you also have a parenthesis before
YEARSwhich is not required. And then you don’t need 3 at the end.February 25, 2023 at 10:59 AM #49032
BrendanKeymasterAlso, what does this have to do with looping? Just curious. Oh, also you need an
elsepart 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
Purchasedis empty.February 25, 2023 at 11:09 AM #49034
Glen ForisterParticipantIt 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.
-
This reply was modified 2 years, 8 months ago by
Glen Forister.
-
This reply was modified 2 years, 8 months ago by
Glen Forister.
Attachments:
You must be logged in to view attached files.February 25, 2023 at 11:14 AM #49038
BrendanKeymasterYour formula from your screenshot is invalid. You’re missing semi-colons and you have a subtract character in there.
February 25, 2023 at 12:53 PM #49042
Glen ForisterParticipantPlease look at my earlier comment I was creating when you were posting a problem I was fixing.
-
This topic was modified 2 years, 8 months ago by
-
AuthorPosts
You must be logged in to reply to this topic.