Hi everyone,
I’m trying to create an Age Calculator in Bubble that automatically calculates a user’s age from their date of birth and updates dynamically. I’ve added a Date of Birth field in my database, but I’m not sure which formula or workflow to use to display the correct age in years. Could someone guide me on the best way to do this whether using a formula, custom state, or workflow logic?
Thanks in advance!
Try Current date/time - User’s Date of Birth:format as years:floor
In your text element, you can drop in something like Current date/time minus DoB formatted as years and then wrap it with :floor to avoid decimals. I used the same setup after playing around with tools that help calculate your age, and the logic matches perfectly. Just make sure your DoB field is a date type, then Bubble handles the math once you reference it.