Solved

Convert birthdate into age.

Posted on 2006-10-31
6
1,284 Views
Last Modified: 2012-06-21
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
Comment
Question by:louy3
6 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 200 total points
Comment Utility
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

by:Ken Turner
Ken Turner earned 200 total points
Comment Utility
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

by:bdreed35
bdreed35 earned 100 total points
Comment Utility
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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 9

Author Comment

by:louy3
Comment Utility
Still not working...but closer.  Age is coming up with a number..  30166
0
 
LVL 28

Expert Comment

by:bdreed35
Comment Utility
Did you try it with the formula from the link I posted:

WhileReadingRecords;
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 100

Expert Comment

by:mlmcc
Comment Utility
Glad i could help

mlmcc
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now