473,406 Members | 2,849 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Calculate Years

Hi All
Being a Newbie and tried very hard to get my Database (Access) to calculate
the age of a person, in years, from the Date of Birth.

The Fields are:
DateofBirth minus Today's Date =Age, in years, of person.

Any help will be much appreciated.
Did post before but I think it got lost, sorry.
Many thanks
P...
Nov 12 '05 #1
3 5559
You could try;

DateDiff("yyyy", Date_Of_Birth, Now)

BUT; there is a catch.... If you have the Date_Of_Birth as 01-Jan-2000 and
31-Dec-2000, they will both give you 3 years.... So you may have to a
comparison of the date and month as well, to figure out if you need to
subtract a year....

"Alan Mews" <al*******@btinternet.com> wrote in message
news:bn**********@titan.btinternet.com...
Hi All
Being a Newbie and tried very hard to get my Database (Access) to calculate the age of a person, in years, from the Date of Birth.

The Fields are:
DateofBirth minus Today's Date =Age, in years, of person.

Any help will be much appreciated.
Did post before but I think it got lost, sorry.
Many thanks
P...

Nov 12 '05 #2
> Being a Newbie and tried very hard to get my Database (Access) to calculate
the age of a person, in years, from the Date of Birth.

The Fields are:
DateofBirth minus Today's Date =Age, in years, of person.


See:

Age() Function
http://members.iinet.net.au/~allenbrowne/func-08.html

--
Bruce M. Thompson, Microsoft Access MVP
bt******@mvps.org (See the Access FAQ at http://www.mvps.org/access)
NO Email Please. Keep all communications

within the newsgroups so that all might benefit.<<
Nov 12 '05 #3
Many Thanks for all your help.

A....
"Alan Mews" <al*******@btinternet.com> wrote in message
news:bn**********@titan.btinternet.com...
Hi All
Being a Newbie and tried very hard to get my Database (Access) to calculate the age of a person, in years, from the Date of Birth.

The Fields are:
DateofBirth minus Today's Date =Age, in years, of person.

Any help will be much appreciated.
Did post before but I think it got lost, sorry.
Many thanks
P...

Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: David Gray | last post by:
Greetings all, Quick newbie type question: I would like to be able to trap non-numerical data entered into a textbox via CTRL+C and/or Shift+Insert. I realise that this data can be...
4
by: Jan Szymczuk | last post by:
I'm creating an MS Access 2000 database where I have a number of people entered using simple basic fields, Surname: SMITH Forenames: John DoB: 09/09/1958 Age:...
6
by: carl.barrett | last post by:
Hi, I have a continuous form based on a query ( I will also be creating a report based on the same query). There are 2 fields: Date Obtained and Date Of Expiry I want a further 3 columns...
6
by: charliewest | last post by:
Can someone pls point me to or recommend the easiest way to calculate someone´s age using the TimeSpan object, in .NET CF? Isn´t there a simple way to use the TimeSpan object to calculate the...
2
by: chrisb1586 | last post by:
Hey guys I have no idea with what im doing with loops( a for, do, or while loop any of the 3) or the logic on how to do this and i have to have this done for school tommorow. I have to create a...
5
by: infobescom | last post by:
Hi I am wrking on a application where i need to calculate the difference between two dates .. here is the formula i am using ........ Public Function GetNumberOfWorkDays(sStartDate,...
4
by: MCLR | last post by:
Good day to all: I found your website a couple of days ago as I was searching for resources that can help within my particular problem in writing a script for an Access Query. The issue is to...
9
by: Pierre Quentel | last post by:
Hi all, I have searched in the standard distribution if there was a function to return the difference between 2 dates expressed like an age : number of years, of months and days. The difference...
4
by: Vince | last post by:
Given a week Number, how do I calculate the date that for the Monday of that week?
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.