Post Closed
147
Views
4
Comments
Age calculator (3 years, 1 month 27 days )
Question

 When I select a date of birth, I need to show the year month days. I need like as shown in the image. 

2022-08-03 04-32-50
Ravi Punjwani

Hi Girivasan,

Have you tried looking for an existing forge component?

I found this one that comes with a demo also

https://www.outsystems.com/forge/component-overview/8401/age-calculator


Hope this covers your requirements.

UserImage.jpg
SSP

You can simply create separate expression for Year, month and day. Calculate each one based on DOB.


2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Girivasan,

This is just basic programming, and has little to do with OutSystems proper. Also, it depends on the functional definition of the problem what the solution is. Especially since not all months have the same number of days, when do you say someone's a month old? For example, date of birth is on 28 June, is someone 1 month 1 day old on 29 July? What if they're born on the 31st of June, when are they 1 month 1 day old? On the 1st of August? The 2nd?

That said, your question has been asked before here on the forum, so perhaps the answer there can help you.