Hello, does anyone know Sugar Logic formula to calculate age based on a Birthdate date field.
Create a field for the Age with integer data type and make it a calculated field through the studio.
By using the below formula you can calculate the Age.
Hope this helps you and you are looking for the same.
Keep in mind that calculated fields are re-calculated only when you save the record, or by manually triggering the "Recalculate Values" in the List View Action Menu on a set of selected records, so if you have a record that has not been updated for a while the age will be wrong.
To keep the field up to date you have a few options:
I suppose you could make the last two DB fields that recalculate when the record is opened, but I think that would mean a LOT of unnecessary saves to your DB, and trigger the update of your Last Modified and Modified By every time one simply opens a record...
All in all, I would recommend against adding such a field. Just a personal preference.
This is only an approximate figure. E.g. according to the formula someone who was born on March 3rd, 1958 is already 63 years old on February15th, 2021 (two weeks too early). If you want it exactly you have to take the leap years into account.
But still a damn good formula. :-)
PS: I think the full formula could be:
Harald Kuske thanks for your alternate version, certainly shorter than the one mentioned here:
CRM Business Consultant
I wonder how it is supposed Sugar Logic to recalculate each all contact's age on a daily basis... That should be piece of work for a scheduled job, thought
Have you set your mind regarding the approach to use?
We make work in Sugar CRM system faster, more convenient and efficient