Putting age in a database

Hi. I have an app where I have a Data Type for “Patients” and I want it to have “Age” field. How can I dynamically do this where in it automatically compute the Patient’s age based on his/her birthday and does not need to be updated every year?

Instead of storing the age. Just store the Date of birth.
You can display age after by doing Current date - Date of birth.
If you really want to store age, you will need to update it every year.

1 Like

Thank you sir. Just trying to find if there’s other solution. Maybe that’s my last resort. Thank you again!

1 Like