D
Denis
Is it possible to create an expression to calculate
current age from a medium date?
Thanks, Denis.
current age from a medium date?
Thanks, Denis.
Is it possible to create an expression to calculate
current age from a medium date?
Thanks, Denis.
-----Original Message-----
Is it possible to create an expression to calculate
current age from a medium date?
Thanks, Denis.
From *any* date (the format is completely irrelevant):
Age: DateDiff("yyyy", [birthdate], Date()) - IIF(Format ([birthdate],
"mmdd") > Format(Date(), "mmdd"), 1, 0)
.
Denis said:This seems to work for ages up to 74, after that I get
negative values, e.g. for birthdate "15-May-29", I get
age "-25". What am I doing wrong?
Denis
-----Original Message-----
Is it possible to create an expression to calculate
current age from a medium date?
Thanks, Denis.
From *any* date (the format is completely irrelevant):
Age: DateDiff("yyyy", [birthdate], Date()) - IIF(Format ([birthdate],
"mmdd") > Format(Date(), "mmdd"), 1, 0)
.
This seems to work for ages up to 74, after that I get
negative values, e.g. for birthdate "15-May-29", I get
age "-25". What am I doing wrong?