Hi,
I am trying to calculate the age of a person, the field name is cust_dob
the formulae I used, I copied and modified from posts on calculating age,
in an expression box is
floor( ( number(substring(today(), 1, 4))
+ number(substring(today(), 6, 2)) / 12
+ number(substring(today(), 9, 2)) / 365.25)
- ( number(substring(@cust_dob, 1, 4))
+ number(substring(@cust_dob, 6, 2)) / 12
+ number(substring(@cust_dob, 9, 2)) / 365.25))
I kept getting an error at the first @ symbol, when trying to verify the formula
Why???
I stripped down the equation to just
number(substring(cust_dob(), 1, 4))
and was getting a "NaN" appearing on the expression box.
I continued stripping the formula down to just substring(@cust_dob, 1, 4).
And I actually got a correct value.
I have gone back and started from scratch and copied the formula using all the Fx keys as is available, I found I was getting Node errors until I put a space before the 12 and the 365.25.
This time I was able to successfully create the formula without any Verify errors. BUT NaN appeared!!!!!!
What am I doing wrong??
In the meantime I shall continue to try to resolve.
Any Clues as to why anyone to a successful outcome??