Hi,
I have a table named Admittance, it has fields, Case Number, Birth Date that stores all patients admitted till date starting many years earlier.
I need to find out the age (in years and months) of all patients in the year 2007.
The main aim is to find out if any one of them was 18 yrs old in 2007.
Hope I explained enough to understand the requirement.
Please help,
Thanks
3 3397
Hi,
I have a table named Admittance, it has fields, Case Number, Birth Date that stores all patients admitted till date starting many years earlier.
I need to find out the age (in years and months) of all patients in the year 2007.
The main aim is to find out if any one of them was 18 yrs old in 2007.
Hope I explained enough to understand the requirement.
Please help,
Thanks
Select Admittance.[Case Number],DateDiff("m",[Birth Date], 12/31/2007)/12 as Age From Admittance Where DateDiff("m",[Birth Date], 12/31/2007)/12 is Between 18.0 and 18.9999;
This would return Age in decimal values 18.5 would be 18 yrs 6 months
Select Admittance.[Case Number],DateDiff("m",[Birth Date], 12/31/2007)/12 as Age From Admittance Where DateDiff("m",[Birth Date], 12/31/2007)/12 is Between 18.0 and 18.9999;
This would return Age in decimal values 18.5 would be 18 yrs 6 months
I tried your query, but for a Case number with Birth Date of 1/1/1918, its giving the Age as -18.083333 !!
Please help
Thanks
I tried your query, but for a Case number with Birth Date of 1/1/1918, its giving the Age as -18.083333 !!
Please help
Thanks
What is the actual format of the birth date column? Access read that record as 1/1/2018.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: dik mus |
last post by:
Hi,
I connect to a database that only stores the year and weeknumber. But i need
the date of the corresponding monday.
This could be more difficult as one expect because the weekumbers might...
|
by: Matt |
last post by:
Given a date, how to find the beginning date and ending date of that week
please advise!
|
by: Burghew |
last post by:
Hello,
I generate invoices for my customers evry month. I want to keep a form which
will allow the user to select the Month and Year through a combo and thus
generate reports based on the month...
|
by: Lyle Fairfield |
last post by:
Year Numbers
A recent post prompts me to point out a capability of JET 4.0, to set the
seed and increment of identity columns. (This is not a solution for that
post.)
I create a Table named...
|
by: ibiza |
last post by:
Hi all,
I need to find a specific, for example the third friday of a given
month/year. How to do that?
thanks :)
|
by: Matuag |
last post by:
Hi All,
I am trying to create a form which can calculate with Age and Birth
Date fields. I want Age to be calculated based on Birth Date (which I
managed to do) but at the same time if Birth...
|
by: Scott |
last post by:
I have two fields in a query that hold dates. One is DOB, the other is
HireDate. I want to add a field to a query that will take the
employees DOB and based on their hire date, wil display their...
|
by: cjohns |
last post by:
I am brand new to programing and am trying to write a C++ program that calculates how many days are left to a persons birthday. I need to make a function for the leap years, and to get number of...
|
by: karimufeed |
last post by:
I am working on an access project for pension calculation. I want to generate the retirement date automatically at the age of 60 years while filling the date of Birth. i.e. if the Date of birth is...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
|
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...
| | |