Solved

How old am I?

Posted on 1998-06-03
5
168 Views
Last Modified: 2010-04-06
Is there a simple procedure that tells me how old I am, if I know my birthday and todays date?
0
Comment
Question by:rainbowsoftware
[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
  • Learn & ask questions
  • 3
5 Comments
 
LVL 5

Accepted Solution

by:
julio011597 earned 100 total points
ID: 1350062
Should be:

--//--
age := year_now - year_born;
if month_now < month_born then Dec(age);
else if (month_now = month_born) and (day_now < day_born) then Dec(age);
--//--

Feel free to ask more.

Regards, julio
0
 
LVL 3

Expert Comment

by:Pegasus100397
ID: 1350063
Apart from the fact that that is not an age - unless you are used to tell your friends you are 7152 days old -, i cannot see any loop in my code...!?

-julio
0
 
LVL 5

Expert Comment

by:julio011597
ID: 1350064
Age is a stage of mind. No computer program can tell you
what is your real age :-)
0
 
LVL 2

Expert Comment

by:kjteng
ID: 1350065
rainbow, please, grade this question... grading is your part of the work.

Thanks, julio
0
 
LVL 5

Expert Comment

by:julio011597
ID: 1350066
Julio, your procedure is just perfect, please receive 100 pts.

kjteng, your comment is true, so maybe I should forget all about how old I am.

Best regards
Rainbow
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

691 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