Hi Experts,
I had a req to find member_Age using his DateOfBirth and currrentDate()
finally a need to get Age in years.
i am using 7.5 Parallel in AIX env.
how to find Age --using DOB and currDate
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
365.25 would be closer, and 365.249 even closer (for really long-lived folks). But better would be to compare the dates properly - subtract the years and then add one if the birthdate has already gone past in the current year.
Beware of other cultural conventions. In some Chinese applications, a child is deemed to be 1 at birth. This would affect your arithmetic.
Beware of other cultural conventions. In some Chinese applications, a child is deemed to be 1 at birth. This would affect your arithmetic.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.