In article
<35636db7-53d1-4018-8729-a542d3bc4217 (AT) glegroupsg2000goo (DOT) googlegroups.com>,
comp.databases.filemaker (AT) googlegroups (DOT) com wrote:
Quote:
Greetings all, I have the next task and need some help. I hope you can
help me.
1 .- As from a date of birth (date field of type date) to obtain the
current age |
This one is fairly easy ... although not as easy as most people first
think. You can NOT just subtract the two dates and divide by 365 thanks to
the problem of Leap Years.
What you have to do is subtract their birth year from today's year to get
the age the person will become on this year's birthday.
e.g.
Year(Get(CurrentDate)) - Year(BirthDate)
If you need to be more exact, then you also have to subtract 1 if they
have not yet had their birthday this year. The easiest way to do that is
to check if the today's date is before their birthday this year.
e.g.
If(Get(CurrentDate) > Date(Month(BirthDate);
Day(BirthDate);
Year(Get(CurrentDate));
-1;
0)
That gives a complete calculation of:
Age Calculation Number Result, Unstored
= Year(Get(CurrentDate)) - Year(BirthDate)
+ If(Get(CurrentDate) > Date(Month(BirthDate);
Day(BirthDate);
Year(Get(CurrentDate));
-1;
0)
That will give you their age as of today. You can change the
Get(CurrentDate) functions to any other date or date field you like to get
the age as at that particular date.
Quote:
2 .- I am doing a medical egress in FileMaker, and I need some way for
me not to print the text limits the size of the field, I tried golf but
I fuision it to me all the success in scrambled the printing. |
Sorry, I don't understand what you're doing or want to do here. The
storage lmit for a text field is quite a lot of text. The display limit is
defined by how long / wide you stretch the field in Layout mode (you can
use Sliding to close up any gaps when printing / previewing the Layout).
Helpful Harry

)