Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
Solved

Convert birthdate into age.

Posted on 2006-10-31
Medium Priority
1,294 Views
Here's what I am using..  Truncate((CurrentDate - {ScheduleAllocations.Birthdate}) / 365.25)  I see that this works for some..  No errors, but the formula tree does not have a "check" on it??  Hope that makes sense.. thanks in advance..
0
Question by:louy3
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 101

Accepted Solution

mlmcc earned 800 total points
ID: 17842425
Not sure what you mean by a CHECK on the formula tree.

You could also use
Truncate(DateDiff('y',CurrentDate,{ScheduleAllocations.Birthdate})

mlmcc
0

LVL 6

Assisted Solution

Ken Turner earned 800 total points
ID: 17842605
Could the lack of a "check" on the formula tree be because you've created the formula, but you haven't placed it on your report (or used it in another formula)?
0

LVL 28

Assisted Solution

bdreed35 earned 400 total points
ID: 17842947
In order for a field to have the green check mark, you have to use it somewhere on the report.  Just because you create it, doesn't mean the report will use it.
As far as the formula goes for age, the only accurate method I know of to get the age is found here on Ken Hamady's site: http://kenhamady.com/form06.shtml
The method you are using will be accurate most of the time but could be off as much as 1 day a year.
0

LVL 9

Author Comment

ID: 17844051
Still not working...but closer.  Age is coming up with a number..  30166
0

LVL 28

Expert Comment

ID: 17844238
Did you try it with the formula from the link I posted:

DateVar Birth:= {ScheduleAllocations.Birthdate};
DateVar Ann := CurrentDate;
if (Month(Ann) * 100) + Day (Ann) >=(Month(Birth) *100) + Day (Birth)
then Year (Ann) - Year(Birth)
else Year (Ann) - Year(Birth) -1
0

LVL 101

Expert Comment

ID: 17844400

mlmcc
0

Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month8 days, 8 hours left to enroll