Tap Forms – Organizer Database App for Mac, iPhone, and iPad › Forums › Using Tap Forms › years between dates
What is wrong with this to find the difference in years between two dates?
I’ve also tried = MONTHS(Today;Purchased)/12
All I get is = Dec 31, 1969 at 3:59:54 PM
The field for the # of years is decimal style with 2 decimal places.
Did you try the YEARS(TODAY(); Purchased) function instead?
That’ll give you the number of years between those two dates.
Also TODAY() is a function, so you need the ().
That wasn’t on the list to select from.
Tried it and get a date as result. = Dec 31, 1969 at 3:59:50 PM
field is calculated
type is Decimal
Is there another setting someplace?
It was in the list of functions on the right on the Formula Edit screen.
In any case, you have your Result Type set to return a Date value, but the YEARS() function actually returns a Number type.
Thanks. That setting gets me every time.
But, why is the result look at a quick glance, but why are all the values negative? ie: -4.
My numbers for age in months is positive, but these are all negative.
AH, position matters. I got it…
You could also add ABS() around your function to get the absolute value, which will always return a positive number.
ABS(X) returns the absolute value. e.g. ABS(4) = 4 and ABS(-4) = 4.
You must be logged in to reply to this topic.
Log in / Register