Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Access_Calculate Number of Days

Status
Not open for further replies.

Help4ME2

Programmer
May 29, 2008
3
US
I need to calculate the number of days between a date of birth and now. Using Access 97.
 
Have a look at the DateDiff() function.

Hope this helps

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
i did., so.. if my field name is DOB, what do i specify - exactly.
 
What did you try?



HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
DaysElapsed: DateDiff("d",[RecDOB],Now())

i am new to all of this- sorry-
 
No worries, the syntax you've got looks good (maybe use single quotes rather than " if you're doing this in query designer).

I assume it doesn't return what you want?

If not what is the datatype of the [RecDOB] field?

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
[wink]

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top