How do I calculate the Age of a person with a given birthdate and return it as an integer?
F
Fathia Jama
started a topic
over 2 years ago
How do I calculate the Age of a person with a given birthdate and return it as an integer, I am using Semarchy 5.2 and Postgres as the backend (I want to ensure that people records with date of birth have someone in an allowed age range). I tried something like this but it does not work as an expression in the Validations feature: DATE_PART('year',AGE(CAST('06/06/1966' as TIMESTAMP)))
Fathia Jama
How do I calculate the Age of a person with a given birthdate and return it as an integer, I am using Semarchy 5.2 and Postgres as the backend (I want to ensure that people records with date of birth have someone in an allowed age range). I tried something like this but it does not work as an expression in the Validations feature: DATE_PART('year',AGE(CAST('06/06/1966' as TIMESTAMP)))
You can use the following SemQL expression:
Put this into a Collection table column labeled 'Age' and you get this:
The above can be also an Enricher Expression but remember if you need to put it in a validation then it needs to resolve to either a True/False e.g.
Fathia Jama
You can use the following SemQL expression:
Put this into a Collection table column labeled 'Age' and you get this:
The above can be also an Enricher Expression but remember if you need to put it in a validation then it needs to resolve to either a True/False e.g.
-
Extend a model with new entities or attributes
-
Data types in xDM
-
Effective date on entities
-
Search using wild cards
-
Export a model from production and import on a development environment
-
"Allow Delete" vs "Allow Removal" privileges
-
LOV label in Named Query
-
Select location on a map and save coordinates
-
Is there a way to set up a master-detail relationship on browse mode?
-
Choose Either a Stepper or A Workflow Based on The User Privileges
See all 268 topics