Is there a way to compute the age of a user on the fly in the "rewrite result" section of a date field?

I am trying to avoid computed field and having to use cron on that one. What I would like to achieve is having the age calculated and displayed on the fly in a date field (date of birth) included in a view.

Any and all input on this will be greatly appreciated. Thank you. :)


This might help you with the "on the fly" age calculation:

Then use the Views PHP module to implement it in your view. Or if you want to use the SQL method you could use the Views Raw SQL module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.