Help with calculating age & displaying a date

papabill

New Member
Joined
Nov 23, 2012
Messages
21
I have the book "Microsoft Office Access 2007 Bible" and I'm trying to calculate age based upon the birthday of our members and the NOW() function. I have searched the book, but it makes little to no sense to me.

Also, I still haven't gotten a good grip on the way to display a date as "mm/dd".

Thanks
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
I have the book "Microsoft Office Access 2007 Bible" and I'm trying to calculate age based upon the birthday of our members and the NOW() function. I have searched the book, but it makes little to no sense to me.

Also, I still haven't gotten a good grip on the way to display a date as "mm/dd".

Thanks

You can try two diferent formulas!

Book1
ABC
1date of birthtodayAge
215/04/196818/04/201547
315/04/196818/04/201547
Foglio3
Cell Formulas
RangeFormula
B2=TODAY()
B3=TODAY()
C2=DATEDIF(A2,B2,"y")
C3=INT((B3-A3)/365)
 
Upvote 0
Assuming two fields, ID, Birth Date in Table1

In a query

Code:
SELECT Table1.CustID, Table1.BDate, DateDiff("yyyy",[Bdate],Now()) AS Age
FROM Table1;
 
Upvote 0
Assuming two fields, ID, Birth Date in Table1
In a query
Code:
SELECT Table1.CustID, Table1.BDate, DateDiff("yyyy",[Bdate],Now()) AS Age
FROM Table1;

Pardon what might be a dumb question, but exactly where does that go? I'm so new with Access I don't know where to put it.
 
Upvote 0
Open a new query. In the upper left corner you should see a drop down. Select SQL and paste this in. Open the query in datasheet view to see the results. Or open in design view and make sure that the table names and field names agree with what you have in your tables. I used your example. SQL language is what drives queries. In Access you can either do it in the QBE or write SQL directly.
 
Upvote 0

Forum statistics

Threads
1,221,877
Messages
6,162,583
Members
451,776
Latest member
bosvinn

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top